On Sat, May 16, 2020 at 11:13:33AM +0800, kbuild test robot wrote: > tree: https://github.com/hnaz/linux-mm master > head: 2bbf0589bfeb27800c730b76eacf34528eee5418 > commit: 724648314aafde8dce6440dbc849f80e45b83289 [494/523] mm: pgtable: add shortcuts for accessing kernel PMD and PTE > config: powerpc-randconfig-r002-20200515 (attached as .config) > compiler: powerpc-linux-gcc (GCC) 9.3.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout 724648314aafde8dce6440dbc849f80e45b83289 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=powerpc > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kbuild test robot <lkp@xxxxxxxxx> > > All error/warnings (new ones prefixed by >>, old ones prefixed by <<): > > arch/powerpc/mm/kasan/kasan_init_32.c: In function 'kasan_unmap_early_shadow_vmalloc': > >> arch/powerpc/mm/kasan/kasan_init_32.c:124:16: error: implicit declaration of function 'pmd_ptr_k'; did you mean 'pmd_off_k'? [-Werror=implicit-function-declaration] > 124 | pmd_t *pmd = pmd_ptr_k(k_cur); > | ^~~~~~~~~ > | pmd_off_k > >> arch/powerpc/mm/kasan/kasan_init_32.c:124:16: warning: initialization of 'pmd_t *' {aka 'struct <anonymous> *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] > cc1: some warnings being treated as errors Argh, missed this one. The patch below fixes the build: >From 5abba15604ab2be0e52d0fd364def18eca8b79aa Mon Sep 17 00:00:00 2001 From: Mike Rapoport <rppt@xxxxxxxxxxxxx> Date: Sat, 16 May 2020 19:04:09 +0300 Subject: [PATCH] powerpc/kasan: fix PMD access in kasan_unmap_early_shadow_vmalloc() The introduction of the generic shortcuts for PMD entry access broke PMD access in kasan_unmap_early_shadow_vmalloc() because the name used in powerpc for the same helper was different from the generic one. Fix it. Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx> --- arch/powerpc/mm/kasan/kasan_init_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/kasan/kasan_init_32.c b/arch/powerpc/mm/kasan/kasan_init_32.c index 16a359ae1686..58c3b51ecd57 100644 --- a/arch/powerpc/mm/kasan/kasan_init_32.c +++ b/arch/powerpc/mm/kasan/kasan_init_32.c @@ -121,7 +121,7 @@ static void __init kasan_unmap_early_shadow_vmalloc(void) phys_addr_t pa = __pa(kasan_early_shadow_page); for (k_cur = k_start & PAGE_MASK; k_cur < k_end; k_cur += PAGE_SIZE) { - pmd_t *pmd = pmd_ptr_k(k_cur); + pmd_t *pmd = pmd_off_k(k_cur); pte_t *ptep = pte_offset_kernel(pmd, k_cur); if ((pte_val(*ptep) & PTE_RPN_MASK) != pa) -- 2.26.2 > vim +124 arch/powerpc/mm/kasan/kasan_init_32.c > > 2edb16efc899f9 Christophe Leroy 2019-04-26 115 > 3d4247fcc938d0 Christophe Leroy 2020-01-14 116 static void __init kasan_unmap_early_shadow_vmalloc(void) > 3d4247fcc938d0 Christophe Leroy 2020-01-14 117 { > 3d4247fcc938d0 Christophe Leroy 2020-01-14 118 unsigned long k_start = (unsigned long)kasan_mem_to_shadow((void *)VMALLOC_START); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 119 unsigned long k_end = (unsigned long)kasan_mem_to_shadow((void *)VMALLOC_END); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 120 unsigned long k_cur; > 3d4247fcc938d0 Christophe Leroy 2020-01-14 121 phys_addr_t pa = __pa(kasan_early_shadow_page); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 122 > 3d4247fcc938d0 Christophe Leroy 2020-01-14 123 for (k_cur = k_start & PAGE_MASK; k_cur < k_end; k_cur += PAGE_SIZE) { > 4a93b1104e586f Mike Rapoport 2020-05-16 @124 pmd_t *pmd = pmd_ptr_k(k_cur); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 125 pte_t *ptep = pte_offset_kernel(pmd, k_cur); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 126 > 3d4247fcc938d0 Christophe Leroy 2020-01-14 127 if ((pte_val(*ptep) & PTE_RPN_MASK) != pa) > 3d4247fcc938d0 Christophe Leroy 2020-01-14 128 continue; > 3d4247fcc938d0 Christophe Leroy 2020-01-14 129 > 3d4247fcc938d0 Christophe Leroy 2020-01-14 130 __set_pte_at(&init_mm, k_cur, ptep, __pte(0), 0); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 131 } > 3d4247fcc938d0 Christophe Leroy 2020-01-14 132 flush_tlb_kernel_range(k_start, k_end); > 3d4247fcc938d0 Christophe Leroy 2020-01-14 133 } > 3d4247fcc938d0 Christophe Leroy 2020-01-14 134 > > :::::: The code at line 124 was first introduced by commit > :::::: 4a93b1104e586f284c8400200eabf37a51a961bc powerpc-add-support-for-folded-p4d-page-tables-fix > > :::::: TO: Mike Rapoport <rppt@xxxxxxxxxxxxx> > :::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx> > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx -- Sincerely yours, Mike.