[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5077aa7e-0167-33b6-35f0-0ea7df8f2375@huawei.com>
Date: Mon, 11 Oct 2021 20:22:05 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <naresh.kamboju@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>
CC: <andreyknvl@...il.com>, <dvyukov@...gle.com>, <glider@...gle.com>,
<kasan-dev@...glegroups.com>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-next@...r.kernel.org>,
<ryabinin.a.a@...il.com>, <sfr@...b.auug.org.au>,
Linux Kernel Functional Testing <lkft@...aro.org>,
Catalin Marinas <catalin.marinas@....com>
Subject: Re: [PATCH] mm: kasan: Fix redefinition of
'kasan_populate_early_vm_area_shadow'
On 2021/10/11 20:32, Kefeng Wang wrote:
> Move kasan_populate_early_vm_area_shadow() from mm/kasan/init.c to
> mm/kasan/shadow.c, make it under CONFIG_KASAN_VMALLOC to fix the
> redefinition issue.
>
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: kasan-dev@...glegroups.com
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
> Hi Andrew,
> Could you help to merge this into previos patch
> "kasan: arm64: fix pcpu_page_first_chunk crash with KASAN_VMALLOC",
> sorry for the build error.
Correct Andrew's mail.
>
> mm/kasan/init.c | 5 -----
> mm/kasan/shadow.c | 5 +++++
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/mm/kasan/init.c b/mm/kasan/init.c
> index d39577d088a1..cc64ed6858c6 100644
> --- a/mm/kasan/init.c
> +++ b/mm/kasan/init.c
> @@ -279,11 +279,6 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,
> return 0;
> }
>
> -void __init __weak kasan_populate_early_vm_area_shadow(void *start,
> - unsigned long size)
> -{
> -}
> -
> static void kasan_free_pte(pte_t *pte_start, pmd_t *pmd)
> {
> pte_t *pte;
> diff --git a/mm/kasan/shadow.c b/mm/kasan/shadow.c
> index 8d95ee52d019..4a4929b29a23 100644
> --- a/mm/kasan/shadow.c
> +++ b/mm/kasan/shadow.c
> @@ -254,6 +254,11 @@ core_initcall(kasan_memhotplug_init);
>
> #ifdef CONFIG_KASAN_VMALLOC
>
> +void __init __weak kasan_populate_early_vm_area_shadow(void *start,
> + unsigned long size)
> +{
> +}
> +
> static int kasan_populate_vmalloc_pte(pte_t *ptep, unsigned long addr,
> void *unused)
> {
>
Powered by blists - more mailing lists