Skip to content

Commit 80d7da1

Browse files
norovarndb
authored andcommitted
asm-generic: Drop getrlimit and setrlimit syscalls from default list
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>
1 parent 942fa98 commit 80d7da1

13 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎arch/arc/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#define __ARCH_WANT_RENAMEAT
2020
#define __ARCH_WANT_STAT64
21+
#define __ARCH_WANT_SET_GET_RLIMIT
2122
#define __ARCH_WANT_SYS_EXECVE
2223
#define __ARCH_WANT_SYS_CLONE
2324
#define __ARCH_WANT_SYS_VFORK

‎arch/arm64/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717

1818
#define __ARCH_WANT_RENAMEAT
1919
#define __ARCH_WANT_NEW_STAT
20+
#define __ARCH_WANT_SET_GET_RLIMIT
2021

2122
#include <asm-generic/unistd.h>

‎arch/c6x/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#define __ARCH_WANT_RENAMEAT
1919
#define __ARCH_WANT_STAT64
20+
#define __ARCH_WANT_SET_GET_RLIMIT
2021
#define __ARCH_WANT_SYS_CLONE
2122

2223
/* Use the standard ABI for syscalls. */

‎arch/csky/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
33

44
#define __ARCH_WANT_SYS_CLONE
5+
#define __ARCH_WANT_SET_GET_RLIMIT
56
#include <asm-generic/unistd.h>
67

78
#define __NR_set_thread_area (__NR_arch_specific_syscall + 0)

‎arch/h8300/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
#define __ARCH_WANT_RENAMEAT
44
#define __ARCH_WANT_STAT64
5+
#define __ARCH_WANT_SET_GET_RLIMIT
56

67
#include <asm-generic/unistd.h>

‎arch/hexagon/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#define sys_mmap2 sys_mmap_pgoff
3131
#define __ARCH_WANT_RENAMEAT
3232
#define __ARCH_WANT_STAT64
33+
#define __ARCH_WANT_SET_GET_RLIMIT
3334
#define __ARCH_WANT_SYS_EXECVE
3435
#define __ARCH_WANT_SYS_CLONE
3536
#define __ARCH_WANT_SYS_VFORK

‎arch/nds32/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#define __ARCH_WANT_STAT64
55
#define __ARCH_WANT_SYNC_FILE_RANGE2
6+
#define __ARCH_WANT_SET_GET_RLIMIT
67

78
/* Use the standard ABI for syscalls */
89
#include <asm-generic/unistd.h>

‎arch/nios2/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#define __ARCH_WANT_RENAMEAT
2222
#define __ARCH_WANT_STAT64
23+
#define __ARCH_WANT_SET_GET_RLIMIT
2324

2425
/* Use the standard ABI for syscalls */
2526
#include <asm-generic/unistd.h>

‎arch/openrisc/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#define __ARCH_WANT_RENAMEAT
2323
#define __ARCH_WANT_STAT64
24+
#define __ARCH_WANT_SET_GET_RLIMIT
2425
#define __ARCH_WANT_SYS_FORK
2526
#define __ARCH_WANT_SYS_CLONE
2627

‎arch/riscv/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#ifdef __LP64__
1919
#define __ARCH_WANT_NEW_STAT
2020
#endif /* __LP64__ */
21+
#define __ARCH_WANT_SET_GET_RLIMIT
2122

2223
#include <asm-generic/unistd.h>
2324

0 commit comments

Comments
 (0)