arch/powerpc/mm/mem.c:428:2: error: call to '__compiletime_assert_303' declared with 'error' attribute: BUILD_BUG_ON failed: TASK_SIZE > MODULES_VADDR
From: kernel test robot
Date: Wed Dec 11 2024 - 09:51:21 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f92f4749861b06fed908d336b4dee1326003291b
commit: 0cc2dc4902f425e346d46deeea2352d9fba75375 arch: make execmem setup available regardless of CONFIG_MODULES
date: 7 months ago
config: powerpc-randconfig-003-20241209 (https://download.01.org/0day-ci/archive/20241211/202412112259.KBIIdlFd-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241211/202412112259.KBIIdlFd-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/202412112259.KBIIdlFd-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:12:
In file included from include/linux/mm.h:2210:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> arch/powerpc/mm/mem.c:428:2: error: call to '__compiletime_assert_303' declared with 'error' attribute: BUILD_BUG_ON failed: TASK_SIZE > MODULES_VADDR
428 | BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
| ^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:467:2: note: expanded from macro 'compiletime_assert'
467 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:455:2: note: expanded from macro '_compiletime_assert'
455 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:448:4: note: expanded from macro '__compiletime_assert'
448 | prefix ## suffix(); \
| ^
<scratch space>:100:1: note: expanded from here
100 | __compiletime_assert_303
| ^
1 warning and 1 error generated.
vim +428 arch/powerpc/mm/mem.c
413
414 struct execmem_info __init *execmem_arch_setup(void)
415 {
416 pgprot_t kprobes_prot = strict_module_rwx_enabled() ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
417 pgprot_t prot = strict_module_rwx_enabled() ? PAGE_KERNEL : PAGE_KERNEL_EXEC;
418 unsigned long fallback_start = 0, fallback_end = 0;
419 unsigned long start, end;
420
421 /*
422 * BOOK3S_32 and 8xx define MODULES_VADDR for text allocations and
423 * allow allocating data in the entire vmalloc space
424 */
425 #ifdef MODULES_VADDR
426 unsigned long limit = (unsigned long)_etext - SZ_32M;
427
> 428 BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki