[15/26] Linux: pkey_mprotect syscall number is always available
diff mbox series

Message ID c837ea7168f7efbaf5f7b61b946ee4abcda73580.1581279333.git.fweimer@redhat.com
State New
Headers show
Series
  • Linux cleanups enabled by built-in system call tables
Related show

Commit Message

Florian Weimer Feb. 9, 2020, 8:20 p.m. UTC
Due to the built-in tables, __NR_pkey_mprotect is always defined.
---
 sysdeps/unix/sysv/linux/pkey_mprotect.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Adhemerval Zanella Feb. 27, 2020, 11:30 p.m. UTC | #1
On 09/02/2020 17:20, Florian Weimer wrote:
> Due to the built-in tables, __NR_pkey_mprotect is always defined.

LGTM, thanks. 

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/pkey_mprotect.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/pkey_mprotect.c b/sysdeps/unix/sysv/linux/pkey_mprotect.c
> index 5d372edfd5..4ec1feba2e 100644
> --- a/sysdeps/unix/sysv/linux/pkey_mprotect.c
> +++ b/sysdeps/unix/sysv/linux/pkey_mprotect.c
> @@ -28,10 +28,5 @@ pkey_mprotect (void *addr, size_t len, int prot, int pkey)
>      /* If the key is -1, the system call is precisely equivalent to
>         mprotect.  */
>      return __mprotect (addr, len, prot);
> -#ifdef __NR_pkey_mprotect
>    return INLINE_SYSCALL_CALL (pkey_mprotect, addr, len, prot, pkey);
> -#else
> -  __set_errno (ENOSYS);
> -  return -1;
> -#endif
>  }
>

Patch
diff mbox series

diff --git a/sysdeps/unix/sysv/linux/pkey_mprotect.c b/sysdeps/unix/sysv/linux/pkey_mprotect.c
index 5d372edfd5..4ec1feba2e 100644
--- a/sysdeps/unix/sysv/linux/pkey_mprotect.c
+++ b/sysdeps/unix/sysv/linux/pkey_mprotect.c
@@ -28,10 +28,5 @@  pkey_mprotect (void *addr, size_t len, int prot, int pkey)
     /* If the key is -1, the system call is precisely equivalent to
        mprotect.  */
     return __mprotect (addr, len, prot);
-#ifdef __NR_pkey_mprotect
   return INLINE_SYSCALL_CALL (pkey_mprotect, addr, len, prot, pkey);
-#else
-  __set_errno (ENOSYS);
-  return -1;
-#endif
 }