* Re: [PATCH next 12/14] bits: move the defitions of BIT() and BIT_ULL() back to linux/bits.h
[not found] <20260121145731.3623-13-david.laight.linux@gmail.com>
@ 2026-01-22 0:50 ` kernel test robot
2026-01-22 1:23 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-01-22 0:50 UTC (permalink / raw)
To: david.laight.linux, Nathan Chancellor, Greg Kroah-Hartman,
Thomas Gleixner, Peter Zijlstra, Ingo Molnar, Mathieu Desnoyers,
Arnd Bergmann, linux-arch, linux-kernel, Yury Norov, Jani Nikula,
Vincent Mailhol, Andy Shevchenko, Kees Cook, Andrew Morton
Cc: llvm, oe-kbuild-all, Linux Memory Management List, David Laight
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20260120]
url: https://github.com/intel-lab-lkp/linux/commits/david-laight-linux-gmail-com/overflow-Reduce-expansion-of-__type_max/20260122-013456
base: next-20260120
patch link: https://lore.kernel.org/r/20260121145731.3623-13-david.laight.linux%40gmail.com
patch subject: [PATCH next 12/14] bits: move the defitions of BIT() and BIT_ULL() back to linux/bits.h
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20260122/202601220832.NJbHlnXC-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260122/202601220832.NJbHlnXC-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601220832.NJbHlnXC-lkp@intel.com/
All errors (new ones prefixed by >>):
163 | _SIG_SET_BINOP(sigandnsets, _sig_andn)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:139:8: note: expanded from macro '_SIG_SET_BINOP'
139 | b3 = b->sig[3]; b2 = b->sig[2]; \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:163:1: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
163 | _SIG_SET_BINOP(sigandnsets, _sig_andn)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:139:24: note: expanded from macro '_SIG_SET_BINOP'
139 | b3 = b->sig[3]; b2 = b->sig[2]; \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:163:1: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
163 | _SIG_SET_BINOP(sigandnsets, _sig_andn)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:140:3: note: expanded from macro '_SIG_SET_BINOP'
140 | r->sig[3] = op(a3, b3); \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:163:1: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
163 | _SIG_SET_BINOP(sigandnsets, _sig_andn)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:141:3: note: expanded from macro '_SIG_SET_BINOP'
141 | r->sig[2] = op(a2, b2); \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:187:1: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
187 | _SIG_SET_OP(signotset, _sig_not)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:174:27: note: expanded from macro '_SIG_SET_OP'
174 | case 4: set->sig[3] = op(set->sig[3]); \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:187:1: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
187 | _SIG_SET_OP(signotset, _sig_not)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:174:10: note: expanded from macro '_SIG_SET_OP'
174 | case 4: set->sig[3] = op(set->sig[3]); \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:187:1: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
187 | _SIG_SET_OP(signotset, _sig_not)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:175:20: note: expanded from macro '_SIG_SET_OP'
175 | set->sig[2] = op(set->sig[2]); \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:187:1: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
187 | _SIG_SET_OP(signotset, _sig_not)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:175:3: note: expanded from macro '_SIG_SET_OP'
175 | set->sig[2] = op(set->sig[2]); \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/arm/kernel/asm-offsets.c:14:
>> include/linux/mm.h:994:26: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
994 | const vm_flags_t mask = BIT((__force int)bit);
| ^
include/linux/bits.h:94:18: note: expanded from macro 'BIT'
94 | #define BIT(nr) BIT_TYPE(unsigned long, nr)
| ^
include/linux/bits.h:88:17: note: expanded from macro 'BIT_TYPE'
88 | ((unsigned int)BIT_INPUT_CHECK(+(nr), BITS_PER_TYPE(type)) + ((type)1 << (nr)))
| ^
include/linux/bits.h:82:24: note: expanded from macro 'BIT_INPUT_CHECK'
82 | sizeof(struct { char bit_number_too_big[-((nr) >= (width))];}), \
| ^
28 warnings and 16 errors generated.
make[3]: *** [scripts/Makefile.build:182: arch/arm/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1330: prepare0] Error 2
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +994 include/linux/mm.h
bc292ab00f6c7a6 Suren Baghdasaryan 2023-01-26 990
568822502383acd Lorenzo Stoakes 2025-11-18 991 static inline bool __vma_flag_atomic_valid(struct vm_area_struct *vma,
2b6a3f061f11372 Lorenzo Stoakes 2025-11-25 992 vma_flag_t bit)
568822502383acd Lorenzo Stoakes 2025-11-18 993 {
2b6a3f061f11372 Lorenzo Stoakes 2025-11-25 @994 const vm_flags_t mask = BIT((__force int)bit);
568822502383acd Lorenzo Stoakes 2025-11-18 995
568822502383acd Lorenzo Stoakes 2025-11-18 996 /* Only specific flags are permitted */
568822502383acd Lorenzo Stoakes 2025-11-18 997 if (WARN_ON_ONCE(!(mask & VM_ATOMIC_SET_ALLOWED)))
568822502383acd Lorenzo Stoakes 2025-11-18 998 return false;
568822502383acd Lorenzo Stoakes 2025-11-18 999
568822502383acd Lorenzo Stoakes 2025-11-18 1000 return true;
568822502383acd Lorenzo Stoakes 2025-11-18 1001 }
568822502383acd Lorenzo Stoakes 2025-11-18 1002
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH next 12/14] bits: move the defitions of BIT() and BIT_ULL() back to linux/bits.h
[not found] <20260121145731.3623-13-david.laight.linux@gmail.com>
2026-01-22 0:50 ` [PATCH next 12/14] bits: move the defitions of BIT() and BIT_ULL() back to linux/bits.h kernel test robot
@ 2026-01-22 1:23 ` kernel test robot
2026-01-22 10:30 ` David Laight
1 sibling, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-01-22 1:23 UTC (permalink / raw)
To: david.laight.linux, Nathan Chancellor, Greg Kroah-Hartman,
Thomas Gleixner, Peter Zijlstra, Ingo Molnar, Mathieu Desnoyers,
Arnd Bergmann, linux-arch, linux-kernel, Yury Norov, Jani Nikula,
Vincent Mailhol, Andy Shevchenko, Kees Cook, Andrew Morton
Cc: llvm, oe-kbuild-all, Linux Memory Management List, David Laight
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20260120]
url: https://github.com/intel-lab-lkp/linux/commits/david-laight-linux-gmail-com/overflow-Reduce-expansion-of-__type_max/20260122-013456
base: next-20260120
patch link: https://lore.kernel.org/r/20260121145731.3623-13-david.laight.linux%40gmail.com
patch subject: [PATCH next 12/14] bits: move the defitions of BIT() and BIT_ULL() back to linux/bits.h
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260122/202601220951.7C4YG7hB-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260122/202601220951.7C4YG7hB-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601220951.7C4YG7hB-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:28:
In file included from include/asm-generic/bitops/generic-non-atomic.h:7:
In file included from arch/arm64/include/asm/barrier.h:14:
>> arch/arm64/include/asm/alternative-macros.h:18:20: warning: 'unsigned' is not defined, evaluates to 0 [-Wundef]
18 | #if ARM64_NCAPS >= ARM64_CB_BIT
| ^
arch/arm64/include/asm/alternative-macros.h:16:22: note: expanded from macro 'ARM64_CB_BIT'
16 | #define ARM64_CB_BIT BIT(ARM64_CB_SHIFT)
| ^
include/linux/bits.h:94:18: note: expanded from macro 'BIT'
94 | #define BIT(nr) BIT_TYPE(unsigned long, nr)
| ^
include/linux/bits.h:88:4: note: expanded from macro 'BIT_TYPE'
88 | ((unsigned int)BIT_INPUT_CHECK(+(nr), BITS_PER_TYPE(type)) + ((type)1 << (nr)))
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:28:
In file included from include/asm-generic/bitops/generic-non-atomic.h:7:
In file included from arch/arm64/include/asm/barrier.h:14:
>> arch/arm64/include/asm/alternative-macros.h:18:20: error: token is not a valid binary operator in a preprocessor subexpression
18 | #if ARM64_NCAPS >= ARM64_CB_BIT
| ^~~~~~~~~~~~
arch/arm64/include/asm/alternative-macros.h:16:22: note: expanded from macro 'ARM64_CB_BIT'
16 | #define ARM64_CB_BIT BIT(ARM64_CB_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:94:18: note: expanded from macro 'BIT'
94 | #define BIT(nr) BIT_TYPE(unsigned long, nr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:88:13: note: expanded from macro 'BIT_TYPE'
88 | ((unsigned int)BIT_INPUT_CHECK(+(nr), BITS_PER_TYPE(type)) + ((type)1 << (nr)))
| ~~~~~~~~ ^
1 warning and 1 error generated.
make[3]: *** [scripts/Makefile.build:182: kernel/bounds.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1330: prepare0] Error 2
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +18 arch/arm64/include/asm/alternative-macros.h
4c0bd995d73ed8 Mark Rutland 2022-09-12 17
4c0bd995d73ed8 Mark Rutland 2022-09-12 @18 #if ARM64_NCAPS >= ARM64_CB_BIT
4c0bd995d73ed8 Mark Rutland 2022-09-12 19 #error "cpucaps have overflown ARM64_CB_BIT"
4c0bd995d73ed8 Mark Rutland 2022-09-12 20 #endif
7cda23da52ad79 Will Deacon 2020-06-30 21
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread