Patchwork [15/26] Linux: pkey_mprotect syscall number is always available

login
register
mail settings
Submitter Florian Weimer
Date Feb. 9, 2020, 8:20 p.m.
Message ID <c837ea7168f7efbaf5f7b61b946ee4abcda73580.1581279333.git.fweimer@redhat.com>
Download mbox | patch
Permalink /patch/37819/
State New
Headers show

Comments

Florian Weimer - Feb. 9, 2020, 8:20 p.m.
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(-)

Patch

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
 }