Re: [PATCH v3] powerpc/mm: Support execute-only memory on the Radix MMU

2022-08-09 Thread Russell Currey
On Tue, 2022-08-09 at 05:51 +, Christophe Leroy wrote: > Le 09/08/2022 à 04:44, Russell Currey a écrit : > > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only) > > through the execute-only pkey.  A PROT_EXEC-only mapping will > > actually > > map to RX, and then the pkey will be

Re: [PATCH v3] powerpc/mm: Support execute-only memory on the Radix MMU

2022-08-09 Thread Aneesh Kumar K V
On 8/9/22 11:21 AM, Christophe Leroy wrote: > Le 09/08/2022 à 04:44, Russell Currey a écrit : >> The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only) >> through the execute-only pkey. A PROT_EXEC-only mapping will actually >> map to RX, and then the pkey will be applied on top of it.

Re: [PATCH v3] powerpc/mm: Support execute-only memory on the Radix MMU

2022-08-08 Thread Christophe Leroy
Le 09/08/2022 à 04:44, Russell Currey a écrit : > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only) > through the execute-only pkey. A PROT_EXEC-only mapping will actually > map to RX, and then the pkey will be applied on top of it. I don't think XOM is a commonly understood

[PATCH v3] powerpc/mm: Support execute-only memory on the Radix MMU

2022-08-08 Thread Russell Currey
The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only) through the execute-only pkey. A PROT_EXEC-only mapping will actually map to RX, and then the pkey will be applied on top of it. Radix doesn't have pkeys, but it does have execute permissions built-in to the MMU, so all we have to