Re: [PATCH v2 02/10] powerpc/book3e: Fix set_memory_x() and set_memory_nx()

2021-10-26 Thread Christophe Leroy
Le 25/10/2021 à 23:53, Christophe Leroy a écrit : On 23/10/2021 13:47, Christophe Leroy wrote: set_memory_x() calls pte_mkexec() which sets _PAGE_EXEC. set_memory_nx() calls pte_exprotec() which clears _PAGE_EXEC. Book3e has 2 bits, UX and SX, which defines the exec rights resp. for user (

Re: [PATCH v2 02/10] powerpc/book3e: Fix set_memory_x() and set_memory_nx()

2021-10-25 Thread Christophe Leroy
On 23/10/2021 13:47, Christophe Leroy wrote: set_memory_x() calls pte_mkexec() which sets _PAGE_EXEC. set_memory_nx() calls pte_exprotec() which clears _PAGE_EXEC. Book3e has 2 bits, UX and SX, which defines the exec rights resp. for user (PR=1) and for kernel (PR=0). _PAGE_EXEC is defined a

[PATCH v2 02/10] powerpc/book3e: Fix set_memory_x() and set_memory_nx()

2021-10-23 Thread Christophe Leroy
set_memory_x() calls pte_mkexec() which sets _PAGE_EXEC. set_memory_nx() calls pte_exprotec() which clears _PAGE_EXEC. Book3e has 2 bits, UX and SX, which defines the exec rights resp. for user (PR=1) and for kernel (PR=0). _PAGE_EXEC is defined as UX only. An executable kernel page is set with