linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: 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'?
Date: Sat, 16 May 2020 20:23:04 +0300	[thread overview]
Message-ID: <20200516172304.GC1059226@linux.ibm.com> (raw)
In-Reply-To: <202005161130.1Ey8DN41%lkp@intel.com>

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.


      reply	other threads:[~2020-05-16 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200516172304.GC1059226@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).