Subject: Re: Fail to boot 5.15 on mpc8347 with either debug_pagealloc or nobats

From: Maxime Bizon <[email-masked]>
Date: Sun, 5 Dec 2021 22:44:08 +0100

On Sunday 05 Dec 2021 à 18:11:59 (+0000), Christophe Leroy wrote:

> > Is BAT5 needed here ?
> 
> Sure it is, because that's were kernel expects lowmem to be mapped. 
> Allthough the kernel will unlikely access the 128M reserved for KASAN 
> directly, the other 128M are still needed.
> 

Yes that was my point

I'm wondering if for specific PAGE_OFFSET values, __mmu_mapin_ram()
ends using a BAT to map exactly the KASAN area, thus wasting it
because the kernel would never/rarely access it.

Or worse, it could consume the latest BAT available, and there would
be none left for the actual KASAN vm area

Maybe mmu_mapin_ram() could clamp top to KASAN phys start.

-- 
Maxime