Re: [PATCH] mm: use enum for vm_flags
From: kernel test robot
Date: Fri Oct 10 2025 - 12:14:15 EST
Hi Alice,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Alice-Ryhl/mm-use-enum-for-vm_flags/20251010-095004
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20251007162136.1885546-1-aliceryhl%40google.com
patch subject: [PATCH] mm: use enum for vm_flags
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20251011/202510110039.N3gHQwXj-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251011/202510110039.N3gHQwXj-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510110039.N3gHQwXj-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from include/linux/pagewalk.h:5,
from fs/proc/task_mmu.c:2:
fs/proc/task_mmu.c: In function 'show_smap_vma_flags':
>> include/linux/mm.h:353:24: warning: "VM_HIGH_ARCH_3" is not defined, evaluates to 0 [-Wundef]
353 | # define VM_PKEY_BIT3 VM_HIGH_ARCH_3
| ^~~~~~~~~~~~~~
fs/proc/task_mmu.c:1184:5: note: in expansion of macro 'VM_PKEY_BIT3'
1184 | #if VM_PKEY_BIT3
| ^~~~~~~~~~~~
vim +/VM_HIGH_ARCH_3 +353 include/linux/mm.h
63c17fb8e5a46a Dave Hansen 2016-02-12 346
5212213aa5a235 Ram Pai 2018-03-27 347 #ifdef CONFIG_ARCH_HAS_PKEYS
8f62c883222c9e Dave Hansen 2016-02-12 348 # define VM_PKEY_SHIFT VM_HIGH_ARCH_BIT_0
9f82f15ddfdd60 Joey Gouly 2024-08-22 349 # define VM_PKEY_BIT0 VM_HIGH_ARCH_0
9f82f15ddfdd60 Joey Gouly 2024-08-22 350 # define VM_PKEY_BIT1 VM_HIGH_ARCH_1
8f62c883222c9e Dave Hansen 2016-02-12 351 # define VM_PKEY_BIT2 VM_HIGH_ARCH_2
9f82f15ddfdd60 Joey Gouly 2024-08-22 352 #if CONFIG_ARCH_PKEY_BITS > 3
8f62c883222c9e Dave Hansen 2016-02-12 @353 # define VM_PKEY_BIT3 VM_HIGH_ARCH_3
9f82f15ddfdd60 Joey Gouly 2024-08-22 354 #else
9f82f15ddfdd60 Joey Gouly 2024-08-22 355 # define VM_PKEY_BIT3 0
9f82f15ddfdd60 Joey Gouly 2024-08-22 356 #endif
9f82f15ddfdd60 Joey Gouly 2024-08-22 357 #if CONFIG_ARCH_PKEY_BITS > 4
2c9e0a6fa2bb75 Ram Pai 2018-03-27 358 # define VM_PKEY_BIT4 VM_HIGH_ARCH_4
2c9e0a6fa2bb75 Ram Pai 2018-03-27 359 #else
2c9e0a6fa2bb75 Ram Pai 2018-03-27 360 # define VM_PKEY_BIT4 0
8f62c883222c9e Dave Hansen 2016-02-12 361 #endif
5212213aa5a235 Ram Pai 2018-03-27 362 #endif /* CONFIG_ARCH_HAS_PKEYS */
5212213aa5a235 Ram Pai 2018-03-27 363
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki