[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211011123211.3936196-1-wangkefeng.wang@huawei.com>
Date: Mon, 11 Oct 2021 12:32:11 +0000
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <naresh.kamboju@...aro.org>, <akpm@...ux-foundatio.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>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
"Linux Kernel Functional Testing" <lkft@...aro.org>,
Catalin Marinas <catalin.marinas@....com>
Subject: [PATCH] mm: kasan: Fix redefinition of 'kasan_populate_early_vm_area_shadow'
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.
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)
{
--
2.27.0
Powered by blists - more mailing lists