* [riteshharjani:kfence-fix-wip6 10/10] arch/powerpc/mm/book3s64/hash_utils.c:1077:37: warning: address of function 'kasan_early_init' will always evaluate to 'true'
@ 2024-07-24 3:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-24 3:03 UTC (permalink / raw)
To: Ritesh Harjani (IBM); +Cc: llvm, oe-kbuild-all
tree: https://github.com/riteshharjani/linux kfence-fix-wip6
head: 28d73773290c65f55d22e038b4f13c5c4941a561
commit: 28d73773290c65f55d22e038b4f13c5c4941a561 [10/10] kfence: disable if not early init
config: powerpc64-randconfig-003-20240724 (https://download.01.org/0day-ci/archive/20240724/202407241025.18f01Xds-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad154281230d83ee551e12d5be48bb956ef47ed3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240724/202407241025.18f01Xds-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/202407241025.18f01Xds-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/mm/book3s64/hash_utils.c:32:
In file included from include/linux/memblock.h:12:
In file included from include/linux/mm.h:2253:
include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
501 | item];
| ~~~~
include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
508 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
520 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:528:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
528 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
529 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/mm/book3s64/hash_utils.c:1077:37: error: use of undeclared identifier 'kfence_early_init'; did you mean 'kasan_early_init'?
1077 | !(IS_ENABLED(CONFIG_KFENCE) && kfence_early_init)) {
| ^~~~~~~~~~~~~~~~~
| kasan_early_init
arch/powerpc/include/asm/kasan.h:69:6: note: 'kasan_early_init' declared here
69 | void kasan_early_init(void);
| ^
>> arch/powerpc/mm/book3s64/hash_utils.c:1077:37: warning: address of function 'kasan_early_init' will always evaluate to 'true' [-Wpointer-bool-conversion]
1077 | !(IS_ENABLED(CONFIG_KFENCE) && kfence_early_init)) {
| ~~ ^~~~~~~~~~~~~~~~~
arch/powerpc/mm/book3s64/hash_utils.c:1077:37: note: prefix with the address-of operator to silence this warning
1077 | !(IS_ENABLED(CONFIG_KFENCE) && kfence_early_init)) {
| ^
| &
6 warnings and 1 error generated.
vim +1077 arch/powerpc/mm/book3s64/hash_utils.c
1070
1071 static void __init htab_init_page_sizes(void)
1072 {
1073 bool aligned = true;
1074 init_hpte_page_sizes();
1075
1076 if (!debug_pagealloc_enabled() &&
> 1077 !(IS_ENABLED(CONFIG_KFENCE) && kfence_early_init)) {
1078 /*
1079 * Pick a size for the linear mapping. Currently, we only
1080 * support 16M, 1M and 4K which is the default
1081 */
1082 if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX) &&
1083 (unsigned long)_stext % 0x1000000) {
1084 if (mmu_psize_defs[MMU_PAGE_16M].shift)
1085 pr_warn("Kernel not 16M aligned, disabling 16M linear map alignment\n");
1086 aligned = false;
1087 }
1088
1089 if (mmu_psize_defs[MMU_PAGE_16M].shift && aligned)
1090 mmu_linear_psize = MMU_PAGE_16M;
1091 else if (mmu_psize_defs[MMU_PAGE_1M].shift)
1092 mmu_linear_psize = MMU_PAGE_1M;
1093 }
1094
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-24 3:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 3:03 [riteshharjani:kfence-fix-wip6 10/10] arch/powerpc/mm/book3s64/hash_utils.c:1077:37: warning: address of function 'kasan_early_init' will always evaluate to 'true' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox