* [hnaz-linux-mm:master 494/523] arch/powerpc/mm/kasan/kasan_init_32.c:124:16: error: implicit declaration of function 'pmd_ptr_k'; did you mean 'pmd_off_k'?
@ 2020-05-16 3:13 kbuild test robot
2020-05-16 17:23 ` Mike Rapoport
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-05-16 3:13 UTC (permalink / raw)
To: Mike Rapoport
Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 3438 bytes --]
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@intel.com>
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
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@linux.ibm.com>
:::::: CC: Johannes Weiner <hannes@cmpxchg.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32332 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [hnaz-linux-mm:master 494/523] arch/powerpc/mm/kasan/kasan_init_32.c:124:16: error: implicit declaration of function 'pmd_ptr_k'; did you mean 'pmd_off_k'?
2020-05-16 3:13 [hnaz-linux-mm:master 494/523] arch/powerpc/mm/kasan/kasan_init_32.c:124:16: error: implicit declaration of function 'pmd_ptr_k'; did you mean 'pmd_off_k'? kbuild test robot
@ 2020-05-16 17:23 ` Mike Rapoport
0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2020-05-16 17:23 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List
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@intel.com>
>
> 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@linux.ibm.com>
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@linux.ibm.com>
---
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@linux.ibm.com>
> :::::: CC: Johannes Weiner <hannes@cmpxchg.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-16 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 3:13 [hnaz-linux-mm:master 494/523] arch/powerpc/mm/kasan/kasan_init_32.c:124:16: error: implicit declaration of function 'pmd_ptr_k'; did you mean 'pmd_off_k'? kbuild test robot
2020-05-16 17:23 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox