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

2022-08-08 Thread Russell Currey
On Mon, 2022-08-08 at 18:28 +0530, Aneesh Kumar K V wrote: > On 8/8/22 5:28 PM, Russell Currey wrote: > > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only) > > through the execute-only pkey.  A PROT_ONLY mapping will actually > > map to > > RX, and then the pkey will be applied on

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

2022-08-08 Thread Aneesh Kumar K V
On 8/8/22 5:28 PM, Russell Currey wrote: > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only) > through the execute-only pkey. A PROT_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

[PATCH] 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_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 do