public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [PATCH] powerpc/kasan: Disable KCOV in KASAN code
@ 2023-07-10  4:41 Benjamin Gray
  2023-07-20 13:50 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Gray @ 2023-07-10  4:41 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Benjamin Gray

As per the generic KASAN code in mm/kasan, disable KCOV with
KCOV_INSTRUMENT := n in the makefile.

This fixes a ppc64 boot hang when KCOV and KASAN are enabled.
kasan_early_init() gets called before a PACA is initialised, but the
KCOV hook expects a valid PACA.

Suggested-by: Christophe Leroy <christophe.leroy@csgroup•eu>
Signed-off-by: Benjamin Gray <bgray@linux•ibm.com>

---

The generic makefile has other disabled sanitisers / hooks, but this
patch is just an upstream of fixing a blocking issue for running
syzkaller. The blocker is resolved by this; kernels stop hanging on boot
with KCOV + KASAN.

This works as an alternative to
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20230707013110.215693-1-bgray@linux.ibm.com/
---
 arch/powerpc/mm/kasan/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/kasan/Makefile b/arch/powerpc/mm/kasan/Makefile
index 699eeffd9f55..f9522fd70b2f 100644
--- a/arch/powerpc/mm/kasan/Makefile
+++ b/arch/powerpc/mm/kasan/Makefile
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 KASAN_SANITIZE := n
+KCOV_INSTRUMENT := n
 
 obj-$(CONFIG_PPC32)		+= init_32.o
 obj-$(CONFIG_PPC_8xx)		+= 8xx.o
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-20 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10  4:41 [PATCH] powerpc/kasan: Disable KCOV in KASAN code Benjamin Gray
2023-07-20 13:50 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox