Subject: Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

From: Erhard Furtner <[email-masked]>
Date: Tue, 12 Sep 2023 02:11:47 +0200

On Mon, 4 Sep 2023 14:55:17 +0000
Christophe Leroy <[email-masked]> wrote:

> Another thing that could be interesting to test is to remove (or comment 
> out) the following line in arch/powerpc/mm/kasan/Makefile :
> 
>    obj-$(CONFIG_PPC_BOOK3S_32)	+= book3s_32.o
> 
> That way, the weak version of kasan_init_region() will be used instead 
> of the one in book3s_32.c

Tinkered around with older kernels and .config options meanwhile. I found out it's not a new issue, also happens on kernel v6.0. Have not tried older kernels yet.

Also on v6.0 the issue disappears when I comment out "obj-$(CONFIG_PPC_BOOK3S_32) += book3s_32.o" in arch/powerpc/mm/kasan/Makefile.

Even more interesting is the issue disappears too when I deselect INIT_STACK_ALL_PATTERN in my kernel .config. The kernel boots just fine with KASAN when INIT_STACK_NONE=y is set! True for kernel v6.0 and v6.6-rc1.

Current v6.6-rc1 kernel .config and dmesg attached.

Regards,
Erhard