[PATCH 1/3] misc: add PKEY_UNRESTRICTED macro

Florian Weimer fweimer@redhat.com
Tue May 27 12:04:23 GMT 2025


* Yury Khrustalev:

> A corresponding macro has been added to Linux UAPI headers in 6.15.
> ---
>  sysdeps/unix/sysv/linux/bits/mman-shared.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h
> index 31590979b9..f8b0710294 100644
> --- a/sysdeps/unix/sysv/linux/bits/mman-shared.h
> +++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h
> @@ -44,6 +44,7 @@
>  
>  /* Access restrictions for pkey_alloc.  */
>  # ifndef PKEY_DISABLE_ACCESS
> +#  define PKEY_UNRESTRICTED 0x0
>  #  define PKEY_DISABLE_ACCESS 0x1
>  #  define PKEY_DISABLE_WRITE 0x2
>  # endif

I think this needs its own #ifdef.  Or we can drop the #ifdef altogher
given that we use exactly the same macro text as the UAPI headers?

Thanks,
Florian



More information about the Libc-alpha mailing list