Re: [PATCH] powerpc/32s: fix BATs setting with CONFIG_STRICT_KERNEL_RWX

2019-04-29 Thread Segher Boessenkool
Acked-by: Segher Boessenkool (But see comments below.) On Mon, Apr 29, 2019 at 09:08:09AM +, Christophe Leroy wrote: > diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c > index bf1de3ca39bc..37cf2af98f6a 100644 > --- a/arch/powerpc/mm/ppc_mmu_32.c > +++ b/arch/powerpc/

[PATCH] powerpc/32s: fix BATs setting with CONFIG_STRICT_KERNEL_RWX

2019-04-29 Thread Christophe Leroy
Serge reported some crashes with CONFIG_STRICT_KERNEL_RWX enabled on a book3s32 machine. Analysis shows two issues: - BATs addresses and sizes are not properly aligned. - There is a gap between the last address covered by BATs and the first address covered by pages. Memory mapped with DBATs: 0: 0