powerpc/kasan: Disable KCOV in KASAN code
PATCH 1/1 powerpc/kasan: Disable KCOV in KASAN code
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.
---
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/[email protected]/
--- arch/powerpc/mm/kasan/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/mm/kasan/Makefile +1 -0
@@ -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
Signature · 1 line
2.41.0
Michael Ellerman
AppliedQuoted 8 lines · 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.[...]
Applied to powerpc/fixes.
[1/1] powerpc/kasan: Disable KCOV in KASAN code
https://git.kernel.org/powerpc/c/ccb381e1af1ace292153c88eb1fffa5683d16a20
cheers