[PATCH v2 1/3] misc: add PKEY_UNRESTRICTED macro
Florian Weimer
fweimer@redhat.com
Wed May 28 09:28:52 GMT 2025
* Florian Weimer:
> * Yury Khrustalev:
>
>> A corresponding macro has been added to Linux UAPI headers in 6.15.
>> ---
>> sysdeps/unix/sysv/linux/bits/mman-shared.h | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h
>> index 31590979b9..01bf526078 100644
>> --- a/sysdeps/unix/sysv/linux/bits/mman-shared.h
>> +++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h
>> @@ -43,10 +43,9 @@
>> # endif
>>
>> /* Access restrictions for pkey_alloc. */
>> -# ifndef PKEY_DISABLE_ACCESS
>> -# define PKEY_DISABLE_ACCESS 0x1
>> -# define PKEY_DISABLE_WRITE 0x2
>> -# endif
>> +#define PKEY_UNRESTRICTED 0x0
>> +#define PKEY_DISABLE_ACCESS 0x1
>> +#define PKEY_DISABLE_WRITE 0x2
>>
>> __BEGIN_DECLS
>
> Okay.
>
> Reviewed-by: Florian Weimer <fweimer@redhat.com>
Sorry, I should have looked closer. This should use an additional
space:
+# define PKEY_UNRESTRICTED 0x0
+# define PKEY_DISABLE_ACCESS 0x1
+# define PKEY_DISABLE_WRITE 0x2
Florian
More information about the Libc-alpha
mailing list