Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-16 Thread Andreas Schwab
On Jun 16 2019, christophe leroy wrote: > If any of registers IBATs 4 to 7 are used, could you adjust > CONFIG_ETEXT_SHIFT so that only IBATs 0 to 3 be used, and check if > suspend/resume works when IBATs 4 to 7 are not used ? I forgot to remove my patch. With only 0-3 used, suspend/resume work

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-16 Thread Andreas Schwab
On Jun 16 2019, christophe leroy wrote: > If any of registers IBATs 4 to 7 are used Nope. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-16 Thread Andreas Schwab
On Jun 16 2019, christophe leroy wrote: > Le 15/06/2019 à 14:28, Andreas Schwab a écrit : >> On Feb 21 2019, Christophe Leroy wrote: >> >>> diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c >>> index a000768a5cc9..6e56a6240bfa 100644 >>> --- a/arch/powerpc/mm/pgtable_32.c

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-16 Thread christophe leroy
Le 15/06/2019 à 14:28, Andreas Schwab a écrit : On Feb 21 2019, Christophe Leroy wrote: diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index a000768a5cc9..6e56a6240bfa 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -353,7 +353,10 @@

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-16 Thread christophe leroy
Le 15/06/2019 à 13:23, Andreas Schwab a écrit : This breaks suspend (or resume) on the iBook G4. no_console_suspend doesn't give any clues, the display just stays dark. After a quick look at the suspend functions, I have the feeling that those functions only store and restore BATs 0 to 3.

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-15 Thread Christophe Leroy
Andreas Schwab a écrit : This breaks suspend (or resume) on the iBook G4. no_console_suspend doesn't give any clues, the display just stays dark. Can you send your .config Thanks Christophe Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-15 Thread Andreas Schwab
On Feb 21 2019, Christophe Leroy wrote: > diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c > index a000768a5cc9..6e56a6240bfa 100644 > --- a/arch/powerpc/mm/pgtable_32.c > +++ b/arch/powerpc/mm/pgtable_32.c > @@ -353,7 +353,10 @@ void mark_initmem_nx(void) > unsigned

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-06-15 Thread Andreas Schwab
This breaks suspend (or resume) on the iBook G4. no_console_suspend doesn't give any clues, the display just stays dark. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

[PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-02-21 Thread Christophe Leroy
Today, STRICT_KERNEL_RWX is based on the use of regular pages to map kernel pages. On Book3s 32, it has three consequences: - Using pages instead of BAT for mapping kernel linear memory severely impacts performance. - Exec protection is not effective because no-execute cannot be set at page level