]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
asm-generic: Drop getrlimit and setrlimit syscalls from default list
authorYury Norov <ynorov@caviumnetworks.com>
Wed, 16 May 2018 08:18:50 +0000 (11:18 +0300)
committerArnd Bergmann <arnd@arndb.de>
Tue, 19 Feb 2019 09:10:06 +0000 (10:10 +0100)
The newer prlimit64 syscall provides all the functionality of getrlimit
and setrlimit syscalls and adds the pid of target process, so future
architectures won't need to include getrlimit and setrlimit.

Therefore drop getrlimit and setrlimit syscalls from the generic syscall
list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's
unistd.h prior to including asm-generic/unistd.h, and adjust all
architectures using the generic syscall list to define it so that no
in-tree architectures are affected.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-hexagon@vger.kernel.org
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Salter <msalter@redhat.com> [c6x]
Acked-by: James Hogan <james.hogan@imgtec.com> [metag]
Acked-by: Ley Foon Tan <lftan@altera.com> [nios2]
Acked-by: Stafford Horne <shorne@gmail.com> [openrisc]
Acked-by: Will Deacon <will.deacon@arm.com> [arm64]
Acked-by: Vineet Gupta <vgupta@synopsys.com> #arch/arc bits
Signed-off-by: Yury Norov <ynorov@marvell.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13 files changed:
arch/arc/include/uapi/asm/unistd.h
arch/arm64/include/uapi/asm/unistd.h
arch/c6x/include/uapi/asm/unistd.h
arch/csky/include/uapi/asm/unistd.h
arch/h8300/include/uapi/asm/unistd.h
arch/hexagon/include/uapi/asm/unistd.h
arch/nds32/include/uapi/asm/unistd.h
arch/nios2/include/uapi/asm/unistd.h
arch/openrisc/include/uapi/asm/unistd.h
arch/riscv/include/uapi/asm/unistd.h
arch/unicore32/include/uapi/asm/unistd.h
include/uapi/asm-generic/unistd.h
scripts/checksyscalls.sh

index 3b3543fd151c2555677445de903346896631a4c1..6a1a62a979dd948cdb992522d01b6f8592b7bce9 100644 (file)
@@ -18,6 +18,7 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SET_GET_RLIMIT
 #define __ARCH_WANT_SYS_EXECVE
 #define __ARCH_WANT_SYS_CLONE
 #define __ARCH_WANT_SYS_VFORK
index dae1584cf017f6aa311a5b78c3311b0bf55c2b18..79937de2a0cce0e02921ca374252d6027183a36e 100644 (file)
@@ -17,5 +17,6 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_NEW_STAT
+#define __ARCH_WANT_SET_GET_RLIMIT
 
 #include <asm-generic/unistd.h>
index 6b2fe792de9d8b2478f9279f610049f52498cea6..e3721b2cfd6acd66a1554290708763d7db66c9d9 100644 (file)
@@ -17,6 +17,7 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SET_GET_RLIMIT
 #define __ARCH_WANT_SYS_CLONE
 
 /* Use the standard ABI for syscalls. */
index 224c9a9ab45b0d2f3cac790a80caaa216a09f957..f5c83492136f6e83d3ae5eca6fb18fb6ab4ee5e7 100644 (file)
@@ -2,6 +2,7 @@
 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
 
 #define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_SET_GET_RLIMIT
 #include <asm-generic/unistd.h>
 
 #define __NR_set_thread_area   (__NR_arch_specific_syscall + 0)
index 628195823816d712e66e06ffdef4b1097d8002c9..b9e9352f2328dcda1535435a719c5f3553db3c95 100644 (file)
@@ -2,5 +2,6 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SET_GET_RLIMIT
 
 #include <asm-generic/unistd.h>
index c91ca7d0246128130812cf0e0a6fac5efa351c4c..6bb392a33c354b815a3cae0f1207db69ba2cea48 100644 (file)
@@ -30,6 +30,7 @@
 #define sys_mmap2 sys_mmap_pgoff
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SET_GET_RLIMIT
 #define __ARCH_WANT_SYS_EXECVE
 #define __ARCH_WANT_SYS_CLONE
 #define __ARCH_WANT_SYS_VFORK
index c2c3a3e340836ff3bee656fb31ca9578ce904f08..eb98d24d3190709950beb9c3dab89d604ea68c98 100644 (file)
@@ -3,6 +3,7 @@
 
 #define __ARCH_WANT_STAT64
 #define __ARCH_WANT_SYNC_FILE_RANGE2
+#define __ARCH_WANT_SET_GET_RLIMIT
 
 /* Use the standard ABI for syscalls */
 #include <asm-generic/unistd.h>
index d9948d88790b1bec9b127893b6149552b5f23135..fa68e68bc26dcc80988eb36fc11edaceeeb2990a 100644 (file)
@@ -20,6 +20,7 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SET_GET_RLIMIT
 
 /* Use the standard ABI for syscalls */
 #include <asm-generic/unistd.h>
index ec37df18d8edece5b743e402523e96ec023ee57a..2e0bc0ff9f317dd39d74bea2c223af3059728a82 100644 (file)
@@ -21,6 +21,7 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SET_GET_RLIMIT
 #define __ARCH_WANT_SYS_FORK
 #define __ARCH_WANT_SYS_CLONE
 
index 1f3bd3ebbb0d27f8abcdd092d1c19fe04f2d6457..d9340c52e7ad132124be55df79f7da70b46614b9 100644 (file)
@@ -18,6 +18,7 @@
 #ifdef __LP64__
 #define __ARCH_WANT_NEW_STAT
 #endif /* __LP64__ */
+#define __ARCH_WANT_SET_GET_RLIMIT
 
 #include <asm-generic/unistd.h>
 
index 1e8fe5941b8ab3b9a4a92cfa1489f2c4238b5a6f..2b575c0cf1779615214b1f5ba62a6f7355eb9984 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #define __ARCH_WANT_RENAMEAT
+#define __ARCH_WANT_SET_GET_RLIMIT
 
 /* Use the standard ABI for syscalls. */
 #include <asm-generic/unistd.h>
index b928eff3bf92b98459b88af6b64c85094d27686c..2cdf600b05fabd2a0b8ab24c66698ca4c40666ac 100644 (file)
@@ -467,10 +467,15 @@ __SYSCALL(__NR_uname, sys_newuname)
 __SYSCALL(__NR_sethostname, sys_sethostname)
 #define __NR_setdomainname 162
 __SYSCALL(__NR_setdomainname, sys_setdomainname)
+
+#ifdef __ARCH_WANT_SET_GET_RLIMIT
+/* getrlimit and setrlimit are superseded with prlimit64 */
 #define __NR_getrlimit 163
 __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
 #define __NR_setrlimit 164
 __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
+#endif
+
 #define __NR_getrusage 165
 __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
 #define __NR_umask 166
index cc70a64fa81f34ef97903e56640d1b6cb9b47d29..53c5677d7e82526219fa2be39ec33d34d6df4f8a 100755 (executable)
@@ -38,6 +38,11 @@ cat << EOF
 #define __IGNORE_lstat64       /* fstatat64 */
 #endif
 
+#ifndef __ARCH_WANT_SET_GET_RLIMIT
+#define __IGNORE_getrlimit     /* getrlimit */
+#define __IGNORE_setrlimit     /* setrlimit */
+#endif
+
 /* Missing flags argument */
 #define __IGNORE_renameat      /* renameat2 */