Re: [PATCH v2 4/5] selftests/mm: Use generic pkey register manipulation

2024-10-28 Thread Kevin Brodsky
On 25/10/2024 17:09, Dave Hansen wrote: > [...] static inline void __page_o_noops(void) { /* 8-bytes of instruction * 512 bytes = 1 page */ diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c index

Re: [PATCH v2 4/5] selftests/mm: Use generic pkey register manipulation

2024-10-25 Thread Dave Hansen
On 10/25/24 01:31, Kevin Brodsky wrote: > I agree, the naming is not ideal, I lacked inspiration! Maybe > PKEY_REG_ALLOW_NONE to remain generic? Works for me. >>> static inline void __page_o_noops(void) >>> { >>> /* 8-bytes of instruction * 512 bytes = 1 page */ >>> diff --git a/tools/testi

Re: [PATCH v2 4/5] selftests/mm: Use generic pkey register manipulation

2024-10-25 Thread Kevin Brodsky
On 23/10/2024 18:51, Dave Hansen wrote: > On 10/23/24 08:05, Kevin Brodsky wrote: > ...> diff --git a/tools/testing/selftests/mm/pkey-x86.h > b/tools/testing/selftests/mm/pkey-x86.h >> index 5f28e26a2511..53ed9a336ffe 100644 >> --- a/tools/testing/selftests/mm/pkey-x86.h >> +++ b/tools/testing/self

Re: [PATCH v2 4/5] selftests/mm: Use generic pkey register manipulation

2024-10-23 Thread Dave Hansen
On 10/23/24 08:05, Kevin Brodsky wrote: ...> diff --git a/tools/testing/selftests/mm/pkey-x86.h b/tools/testing/selftests/mm/pkey-x86.h > index 5f28e26a2511..53ed9a336ffe 100644 > --- a/tools/testing/selftests/mm/pkey-x86.h > +++ b/tools/testing/selftests/mm/pkey-x86.h > @@ -34,6 +34,8 @@ > #defin

[PATCH v2 4/5] selftests/mm: Use generic pkey register manipulation

2024-10-23 Thread Kevin Brodsky
pkey_sighandler_tests.c currently hardcodes x86 PKRU encodings. The first step towards running those tests on arm64 is to abstract away the pkey register values. Since those tests want to deny access to all keys except a few, we have each arch define PKEY_ALLOW_NONE, the pkey register value denyin