]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: pkey_mprotect syscall number is always available
authorFlorian Weimer <fweimer@redhat.com>
Tue, 3 Mar 2020 11:16:35 +0000 (12:16 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 3 Mar 2020 11:16:35 +0000 (12:16 +0100)
Due to the built-in tables, __NR_pkey_mprotect is always defined.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/pkey_mprotect.c

index 5d372edfd5455fd2d419d3229c77a9eac9197758..4ec1feba2ec4108cc9fd38f9857bc62e8585503f 100644 (file)
@@ -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
 }