* Re: [PATCH 3/5] mm: add vaddr param to pmd_populate_kernel
[not found] <20240416122254.868007168-4-mbland@motorola.com>
@ 2024-04-17 8:23 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-17 8:23 UTC (permalink / raw)
To: Maxwell Bland, linux-mm
Cc: llvm, oe-kbuild-all, Maxwell Bland, Richard Henderson,
Ivan Kokshaysky, Matt Turner, Vineet Gupta, Alexander Potapenko,
Marco Elver, Dmitry Vyukov, Russell King, Andrey Ryabinin,
Andrey Konovalov, Vincenzo Frascino, Catalin Marinas, Will Deacon,
Guo Ren, Brian Cain, Huacai Chen, WANG Xuerui, Geert Uytterhoeven,
Sam Creasey, Michal Simek, Thomas Bogendoerfer, Dinh Nguyen,
Jonas Bonn, Stefan Kristiansson, Stafford Horne,
James E.J. Bottomley, Helge Deller, Michael Ellerman
Hi Maxwell,
kernel test robot noticed the following build errors:
[auto build test ERROR on 0bbac3facb5d6cc0171c45c9873a2dc96bea9680]
url: https://github.com/intel-lab-lkp/linux/commits/Maxwell-Bland/mm-allow-arch-refinement-skip-for-vmap-alloc/20240417-032149
base: 0bbac3facb5d6cc0171c45c9873a2dc96bea9680
patch link: https://lore.kernel.org/r/20240416122254.868007168-4-mbland%40motorola.com
patch subject: [PATCH 3/5] mm: add vaddr param to pmd_populate_kernel
config: powerpc64-randconfig-003-20240417 (https://download.01.org/0day-ci/archive/20240417/202404171648.VEQfHAIY-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7089c359a3845323f6f30c44a47dd901f2edfe63)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240417/202404171648.VEQfHAIY-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/202404171648.VEQfHAIY-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/powerpc/mm/kasan/init_book3s_64.c:19:
In file included from include/linux/memblock.h:12:
In file included from include/linux/mm.h:2208:
include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
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_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/mm/kasan/init_book3s_64.c:75:9: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'unsigned long' [-Wint-conversion]
75 | vaddr_start + i * PMD_SIZE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/book3s/64/pgalloc.h:159:38: note: passing argument to parameter 'vaddr' here
159 | pte_t *pte, unsigned long vaddr)
| ^
5 warnings and 1 error generated.
vim +75 arch/powerpc/mm/kasan/init_book3s_64.c
39
40 void __init kasan_init(void)
41 {
42 /*
43 * We want to do the following things:
44 * 1) Map real memory into the shadow for all physical memblocks
45 * This takes us from c000... to c008...
46 * 2) Leave a hole over the shadow of vmalloc space. KASAN_VMALLOC
47 * will manage this for us.
48 * This takes us from c008... to c00a...
49 * 3) Map the 'early shadow'/zero page over iomap and vmemmap space.
50 * This takes us up to where we start at c00e...
51 */
52
53 void *k_start = kasan_mem_to_shadow((void *)RADIX_VMALLOC_END);
54 void *k_end = kasan_mem_to_shadow((void *)RADIX_VMEMMAP_END);
55 phys_addr_t start, end;
56 u64 i;
57 pte_t zero_pte = pfn_pte(virt_to_pfn(kasan_early_shadow_page), PAGE_KERNEL);
58 void *vaddr_start = __va(start);
59
60 if (!early_radix_enabled()) {
61 pr_warn("KASAN not enabled as it requires radix!");
62 return;
63 }
64
65 for_each_mem_range(i, &start, &end)
66 kasan_init_phys_region((void *)start, (void *)end);
67
68 for (i = 0; i < PTRS_PER_PTE; i++)
69 __set_pte_at(&init_mm, (unsigned long)kasan_early_shadow_page,
70 &kasan_early_shadow_pte[i], zero_pte, 0);
71
72 for (i = 0; i < PTRS_PER_PMD; i++) {
73 pmd_populate_kernel(&init_mm, &kasan_early_shadow_pmd[i],
74 kasan_early_shadow_pte,
> 75 vaddr_start + i * PMD_SIZE);
76 }
77
78 for (i = 0; i < PTRS_PER_PUD; i++)
79 pud_populate(&init_mm, &kasan_early_shadow_pud[i],
80 kasan_early_shadow_pmd);
81
82 /* map the early shadow over the iomap and vmemmap space */
83 kasan_populate_early_shadow(k_start, k_end);
84
85 /* mark early shadow region as RO and wipe it */
86 zero_pte = pfn_pte(virt_to_pfn(kasan_early_shadow_page), PAGE_KERNEL_RO);
87 for (i = 0; i < PTRS_PER_PTE; i++)
88 __set_pte_at(&init_mm, (unsigned long)kasan_early_shadow_page,
89 &kasan_early_shadow_pte[i], zero_pte, 0);
90
91 /*
92 * clear_page relies on some cache info that hasn't been set up yet.
93 * It ends up looping ~forever and blows up other data.
94 * Use memset instead.
95 */
96 memset(kasan_early_shadow_page, 0, PAGE_SIZE);
97
98 static_branch_inc(&powerpc_kasan_enabled_key);
99
100 /* Enable error messages */
101 init_task.kasan_depth = 0;
102 pr_info("KASAN init done\n");
103 }
104
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread