Re: [PATCH] powerpc/mm/32s: only use MMU to mark initmem NX if STRICT_KERNEL_RWX

2019-06-16 Thread christophe leroy
Le 15/06/2019 à 16:36, Andreas Schwab a écrit : On Jun 15 2019, Christophe Leroy wrote: Andreas Schwab a écrit : If STRICT_KERNEL_RWX is disabled, never use the MMU to mark initmen nonexecutable. I dont understand, can you elaborate ? It breaks suspend. Ok, but we need to explain w

Re: [PATCH] powerpc/mm/32s: only use MMU to mark initmem NX if STRICT_KERNEL_RWX

2019-06-15 Thread Andreas Schwab
On Jun 15 2019, Christophe Leroy wrote: > Andreas Schwab a écrit : > >> If STRICT_KERNEL_RWX is disabled, never use the MMU to mark initmen >> nonexecutable. > > I dont understand, can you elaborate ? It breaks suspend. > This area is mapped with BATs so using change_page_attr() is pointless.

Re: [PATCH] powerpc/mm/32s: only use MMU to mark initmem NX if STRICT_KERNEL_RWX

2019-06-15 Thread Christophe Leroy
Andreas Schwab a écrit : If STRICT_KERNEL_RWX is disabled, never use the MMU to mark initmen nonexecutable. I dont understand, can you elaborate ? This area is mapped with BATs so using change_page_attr() is pointless. Christophe Also move a misplaced paren that makes the condition alway

[PATCH] powerpc/mm/32s: only use MMU to mark initmem NX if STRICT_KERNEL_RWX

2019-06-15 Thread Andreas Schwab
If STRICT_KERNEL_RWX is disabled, never use the MMU to mark initmen nonexecutable. Also move a misplaced paren that makes the condition always true. Fixes: 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX") Signed-off-by: Andreas Schwab --- arch/powerpc/mm/pgtable_32.c | 4 +++- 1