Re: [PATCH v2] selftests: powerpc: Add test for execute-disabled pkeys

2020-06-02 Thread Michael Ellerman
Sandipan Das writes: > Hi Michael, > > Thanks for your suggestions. I had a few questions regarding some > of them. > > On 29/05/20 7:18 am, Michael Ellerman wrote: >>> [...] >>> + >>> +static void pkeyreg_set(unsigned long uamr) >>> +{ >>> + asm volatile("isync; mtspr 0xd, %0; isync;" : :

Re: [PATCH v2] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-31 Thread Sandipan Das
Hi Michael, On 01/06/20 7:29 am, Sandipan Das wrote: > Hi Michael, > > Thanks for your suggestions. I had a few questions regarding some > of them. > > On 29/05/20 7:18 am, Michael Ellerman wrote: >>> [...] >>> + >>> +static void pkeyreg_set(unsigned long uamr) >>> +{ >>> + asm volatile("isync

Re: [PATCH v2] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-31 Thread Sandipan Das
Hi Michael, Thanks for your suggestions. I had a few questions regarding some of them. On 29/05/20 7:18 am, Michael Ellerman wrote: >> [...] >> + >> +static void pkeyreg_set(unsigned long uamr) >> +{ >> +asm volatile("isync; mtspr 0xd, %0; isync;" : : "r"(uamr)); >> +} > > You can use m

Re: [PATCH v2] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-28 Thread Michael Ellerman
Hi Sandipan, A few comments below ... Sandipan Das writes: > Apart from read and write access, memory protection keys can > also be used for restricting execute permission of pages on > powerpc. This adds a test to verify if the feature works as > expected. > > Signed-off-by: Sandipan Das > ---

[PATCH v2] selftests: powerpc: Add test for execute-disabled pkeys

2020-05-26 Thread Sandipan Das
Apart from read and write access, memory protection keys can also be used for restricting execute permission of pages on powerpc. This adds a test to verify if the feature works as expected. Signed-off-by: Sandipan Das --- Previous versions can be found at v1: https://lore.kernel.org/linuxppc-d