[PATCH] powerpc: don't select KFENCE on platform PPC_FSL_BOOK3E

Michael Ellerman mpe at ellerman.id.au
Wed Oct 13 11:48:20 AEDT 2021


Christophe Leroy <christophe.leroy at csgroup.eu> writes:
> Le 12/10/2021 à 08:24, Michael Ellerman a écrit :
>> Liu Shixin <liushixin2 at huawei.com> writes:
>>> kindly ping.
>> 
>> I was under the impression you were trying to debug why it wasn't
>> working with Christophe.
>
> The investigation was a bit dormant to be honest since Liu confirmed 
> that neither KFENCE not DEBUG_PAGEALLOC works.

No worries. Sorry it fell to you to do the investigation.

> I now looked at the effort to make it work, and it is not trivial.
> At the time being, all linear space is mapped with pinned TLBs and 
> everything is setup for space 0, with space 1 being used temporarily 
> when doing heavy changes to space 0.
>
> We can't use standard pages for linear space on space 0 because we need 
> memory mapped at all time for exceptions (on booke exception run with 
> MMU on in space 0).
>
> In order to use standard pages, we'd need to reorganise the kernel to 
> have it run mostly in space 1 (for data at least) where we would map 
> almost everything with standard pages, and keep pinned TLB to map linear 
> space on space 0 for TLB miss exceptions. Then we'd do more or less like 
> book3s/32 and switch back into space 1 into other exceptions prolog.
>
> That could be good to do it as we could maybe have more code in common 
> with non booke 32 bits, but it is not a trivial job.
>
> So I suggest that for now, we just make KFENCE and DEBUG_PAGEALLOC 
> unselectable for booke/32 (e500 and 44x).

Yep seems reasonable.

cheers


More information about the Linuxppc-dev mailing list