[PATCH v4 02/14] aarch64: Enable internal use of memory protection keys
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Mar 17 12:24:10 GMT 2025
On 02/02/25 18:12, Florian Weimer wrote:
> This adds hidden prototypes to align with commit 7e21a65c58cc91b3ba
> ("misc: Enable internal use of memory protection keys").
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> sysdeps/unix/sysv/linux/aarch64/pkey_get.c | 4 +++-
> sysdeps/unix/sysv/linux/aarch64/pkey_set.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/pkey_get.c b/sysdeps/unix/sysv/linux/aarch64/pkey_get.c
> index 2dd9d8165e..73921e21e3 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/pkey_get.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/pkey_get.c
> @@ -21,7 +21,7 @@
> #include <sys/mman.h>
>
> int
> -pkey_get (int key)
> +__pkey_get (int key)
> {
> if (key < 0 || key > 15)
> {
> @@ -71,3 +71,5 @@ pkey_get (int key)
>
> return PKEY_DISABLE_ACCESS;
> }
> +libc_hidden_def (__pkey_get)
> +weak_alias (__pkey_get, pkey_get)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/pkey_set.c b/sysdeps/unix/sysv/linux/aarch64/pkey_set.c
> index a521cc00da..45a4992997 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/pkey_set.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/pkey_set.c
> @@ -24,7 +24,7 @@
> PKEY_DISABLE_WRITE | PKEY_DISABLE_EXECUTE | PKEY_DISABLE_READ)
>
> int
> -pkey_set (int key, unsigned int restrictions)
> +__pkey_set (int key, unsigned int restrictions)
> {
> if (key < 0 || key > 15 || restrictions > MAX_PKEY_RIGHTS)
> {
> @@ -111,3 +111,5 @@ pkey_set (int key, unsigned int restrictions)
> pkey_write (por_el0);
> return 0;
> }
> +libc_hidden_def (__pkey_set)
> +weak_alias (__pkey_set, pkey_set)
More information about the Libc-alpha
mailing list