From: Linus Torvalds Date: Tue, 10 Aug 2010 19:07:51 +0000 (-0700) Subject: Merge branch 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux X-Git-Tag: firefly_0821_release~9833^2~1035 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b34d8915c413acb51d837a45fb8747b61f65c020;p=firefly-linux-kernel-4.4.55.git Merge branch 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux * 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux: unistd: add __NR_prlimit64 syscall numbers rlimits: implement prlimit64 syscall rlimits: switch more rlimit syscalls to do_prlimit rlimits: redo do_setrlimit to more generic do_prlimit rlimits: add rlimit64 structure rlimits: do security check under task_lock rlimits: allow setrlimit to non-current tasks rlimits: split sys_setrlimit rlimits: selinux, do rlimits changes under task_lock rlimits: make sure ->rlim_max never grows in sys_setrlimit rlimits: add task_struct to update_rlimit_cpu rlimits: security, add task_struct to setrlimit Fix up various system call number conflicts. We not only added fanotify system calls in the meantime, but asm-generic/unistd.h added a wait4 along with a range of reserved per-architecture system calls. --- b34d8915c413acb51d837a45fb8747b61f65c020 diff --cc arch/x86/ia32/ia32entry.S index 17cf65c94804,a88e31d1836e..91dc4bb13032 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S @@@ -842,6 -842,5 +842,7 @@@ ia32_sys_call_table .quad compat_sys_rt_tgsigqueueinfo /* 335 */ .quad sys_perf_event_open .quad compat_sys_recvmmsg + .quad sys_fanotify_init + .quad sys32_fanotify_mark + .quad sys_prlimit64 ia32_syscall_end: diff --cc arch/x86/include/asm/unistd_32.h index 80b799cd74f7,35e0cb151b69..b766a5e8ba0e --- a/arch/x86/include/asm/unistd_32.h +++ b/arch/x86/include/asm/unistd_32.h @@@ -343,12 -343,11 +343,13 @@@ #define __NR_rt_tgsigqueueinfo 335 #define __NR_perf_event_open 336 #define __NR_recvmmsg 337 -#define __NR_prlimit64 338 +#define __NR_fanotify_init 338 +#define __NR_fanotify_mark 339 ++#define __NR_prlimit64 340 #ifdef __KERNEL__ - #define NR_syscalls 340 -#define NR_syscalls 339 ++#define NR_syscalls 341 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR diff --cc arch/x86/include/asm/unistd_64.h index 5b7b1d585616,570bf5eae564..363e9b8a715b --- a/arch/x86/include/asm/unistd_64.h +++ b/arch/x86/include/asm/unistd_64.h @@@ -663,10 -663,8 +663,12 @@@ __SYSCALL(__NR_rt_tgsigqueueinfo, sys_r __SYSCALL(__NR_perf_event_open, sys_perf_event_open) #define __NR_recvmmsg 299 __SYSCALL(__NR_recvmmsg, sys_recvmmsg) -#define __NR_prlimit64 300 +#define __NR_fanotify_init 300 +__SYSCALL(__NR_fanotify_init, sys_fanotify_init) +#define __NR_fanotify_mark 301 +__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) ++#define __NR_prlimit64 302 + __SYSCALL(__NR_prlimit64, sys_prlimit64) #ifndef __NO_STUBS #define __ARCH_WANT_OLD_READDIR diff --cc arch/x86/kernel/syscall_table_32.S index 07ad5eb7cc5c,eca1d7d23ab5..4802accb9d8d --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S @@@ -337,5 -337,4 +337,6 @@@ ENTRY(sys_call_table .long sys_rt_tgsigqueueinfo /* 335 */ .long sys_perf_event_open .long sys_recvmmsg + .long sys_fanotify_init + .long sys_fanotify_mark + .long sys_prlimit64 diff --cc include/asm-generic/unistd.h index c17cebc49952,0dfd517e5ec9..e1898090f22c --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h @@@ -631,18 -626,11 +631,20 @@@ __SYSCALL(__NR_perf_event_open, sys_per __SYSCALL(__NR_accept4, sys_accept4) #define __NR_recvmmsg 243 __SYSCALL(__NR_recvmmsg, sys_recvmmsg) -#define __NR_prlimit64 244 + +/* + * Architectures may provide up to 16 syscalls of their own + * starting with this value. + */ +#define __NR_arch_specific_syscall 244 + +#define __NR_wait4 260 +__SYSCALL(__NR_wait4, sys_wait4) ++#define __NR_prlimit64 261 + __SYSCALL(__NR_prlimit64, sys_prlimit64) #undef __NR_syscalls - #define __NR_syscalls 261 -#define __NR_syscalls 245 ++#define __NR_syscalls 262 /* * All syscalls below here should go away really,