[glibc] Linux: pkey_mprotect syscall number is always available

Florian Weimer fw@sourceware.org
Tue Mar 3 13:27:00 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d9f1add86e356209da64f50cb90583c2791c1c0

commit 5d9f1add86e356209da64f50cb90583c2791c1c0
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Mar 3 12:16:35 2020 +0100

    Linux: pkey_mprotect syscall number is always available
    
    Due to the built-in tables, __NR_pkey_mprotect is always defined.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Diff:
---
 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 5d372ed..4ec1feb 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
 }



More information about the Glibc-cvs mailing list