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: Sun, 3 Sep 2023 23:06:35 +0200

On Fri, 1 Sep 2023 07:43:34 +0000
Christophe Leroy <[email-masked]> wrote:

> >> Can you try what happens when you remove the call to kasan_init() at the
> >> start of setup_arch() in arch/powerpc/kernel/setup-common.c  
> > 
> > Ok, so I left the other patches in place + btext_map() instead of btext_unmap() at the end of MMU_init() + Michaels patch and additionally commented-out kasan_init() as stated above. The outcome is rather interesting! Now I deterministically get this output at boot OF console, regardless wheter it's a cold boot or warm boot:  
> 
> Ah, my bad. You also need to remove the call to kasan_late_init() in 
> mem_init() in arch/powerpc/mm/mem.c

Not tragic. Meanwhile I commented-out kasan_late_init() and updated to kernel v6.5.1.

dmesg did not change however, getting the same "BUG: KASAN: stack-out-of-bounds in __kernel_poison_pages+0x6c/0xd0" as last time only on v6.5.1.

Regards,
Erhard