[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191129070455.62084-1-shaolexi@huawei.com>
Date: Fri, 29 Nov 2019 15:04:55 +0800
From: Lexi Shao <shaolexi@...wei.com>
To: <benh@...nel.crashing.org>, <paulus@...ba.org>,
<mpe@...erman.id.au>, <christophe.leroy@....fr>
CC: <liucheng32@...wei.com>, <yi.zhang@...wei.com>,
<wangkefeng.wang@...wei.com>, <shaolexi@...wei.com>,
<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>
Subject: [PATCH] powerpc/kasan: KASAN is not supported on RELOCATABLE && FSL_BOOKE
CONFIG_RELOCATABLE and CONFIG_KASAN cannot be enabled at the same time
on ppce500 fsl_booke. All functions called before kasan_early_init()
should be disabled with kasan check. When CONFIG_RELOCATABLE is enabled
on ppce500 fsl_booke, relocate_init() is called before kasan_early_init()
which triggers kasan check and results in boot failure.
Call trace and functions which triggers kasan check(*):
- _start
- set_ivor
- relocate_init(*)
- early_get_first_memblock_info(*)
- of_scan_flat_dt(*)
...
- kasan_early_init
Potential solutions could be 1. implement relocate_init and all its children
function in a seperate file or 2. introduce a global vairable in KASAN, only
enable KASAN check when init is done.
Disable KASAN when RELOCATABLE is selected on fsl_booke for now until
it is supported.
Signed-off-by: Lexi Shao <shaolexi@...wei.com>
---
arch/powerpc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3e56c9c2f16e..14f3da63c088 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -171,7 +171,7 @@ config PPC
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
select HAVE_ARCH_JUMP_LABEL
- select HAVE_ARCH_KASAN if PPC32
+ select HAVE_ARCH_KASAN if PPC32 && !(RELOCATABLE && FSL_BOOKE)
select HAVE_ARCH_KGDB
select HAVE_ARCH_MMAP_RND_BITS
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
--
2.12.3
Powered by blists - more mailing lists