diff options
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 5 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sys32.S | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 2 | ||||
-rw-r--r-- | kernel/compat.c | 19 | ||||
-rw-r--r-- | kernel/sys.c | 14 |
6 files changed, 16 insertions, 27 deletions
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 52bea71d93e6..cee31d7910c0 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -258,11 +258,6 @@ ENTRY(sys32_mmap2_wrapper) | |||
258 | llgtr %r2,%r2 # struct mmap_arg_struct_emu31 * | 258 | llgtr %r2,%r2 # struct mmap_arg_struct_emu31 * |
259 | jg sys32_mmap2 # branch to system call | 259 | jg sys32_mmap2 # branch to system call |
260 | 260 | ||
261 | ENTRY(compat_sys_getrusage_wrapper) | ||
262 | lgfr %r2,%r2 # int | ||
263 | llgtr %r3,%r3 # struct rusage_emu31 * | ||
264 | jg compat_sys_getrusage # branch to system call | ||
265 | |||
266 | ENTRY(compat_sys_gettimeofday_wrapper) | 261 | ENTRY(compat_sys_gettimeofday_wrapper) |
267 | llgtr %r2,%r2 # struct timeval_emu31 * | 262 | llgtr %r2,%r2 # struct timeval_emu31 * |
268 | llgtr %r3,%r3 # struct timezone * | 263 | llgtr %r3,%r3 # struct timezone * |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 63d6b4343193..e9c8a88c748e 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -85,7 +85,7 @@ SYSCALL(sys_sigpending,sys_sigpending,compat_sys_sigpending_wrapper) | |||
85 | SYSCALL(sys_sethostname,sys_sethostname,sys32_sethostname_wrapper) | 85 | SYSCALL(sys_sethostname,sys_sethostname,sys32_sethostname_wrapper) |
86 | SYSCALL(sys_setrlimit,sys_setrlimit,compat_sys_setrlimit_wrapper) /* 75 */ | 86 | SYSCALL(sys_setrlimit,sys_setrlimit,compat_sys_setrlimit_wrapper) /* 75 */ |
87 | SYSCALL(sys_old_getrlimit,sys_getrlimit,compat_sys_old_getrlimit_wrapper) | 87 | SYSCALL(sys_old_getrlimit,sys_getrlimit,compat_sys_old_getrlimit_wrapper) |
88 | SYSCALL(sys_getrusage,sys_getrusage,compat_sys_getrusage_wrapper) | 88 | SYSCALL(sys_getrusage,sys_getrusage,compat_sys_getrusage) |
89 | SYSCALL(sys_gettimeofday,sys_gettimeofday,compat_sys_gettimeofday_wrapper) | 89 | SYSCALL(sys_gettimeofday,sys_gettimeofday,compat_sys_gettimeofday_wrapper) |
90 | SYSCALL(sys_settimeofday,sys_settimeofday,compat_sys_settimeofday_wrapper) | 90 | SYSCALL(sys_settimeofday,sys_settimeofday,compat_sys_settimeofday_wrapper) |
91 | SYSCALL(sys_getgroups16,sys_ni_syscall,sys32_getgroups16_wrapper) /* 80 old getgroups16 syscall */ | 91 | SYSCALL(sys_getgroups16,sys_ni_syscall,sys32_getgroups16_wrapper) /* 80 old getgroups16 syscall */ |
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S index 6c65d69c6635..0b4030aff2f8 100644 --- a/arch/sparc/kernel/sys32.S +++ b/arch/sparc/kernel/sys32.S | |||
@@ -36,7 +36,6 @@ STUB: sra REG1, 0, REG1; \ | |||
36 | jmpl %g1 + %lo(SYSCALL), %g0; \ | 36 | jmpl %g1 + %lo(SYSCALL), %g0; \ |
37 | sra REG3, 0, REG3 | 37 | sra REG3, 0, REG3 |
38 | 38 | ||
39 | SIGN1(sys32_getrusage, compat_sys_getrusage, %o0) | ||
40 | SIGN1(sys32_readahead, compat_sys_readahead, %o0) | 39 | SIGN1(sys32_readahead, compat_sys_readahead, %o0) |
41 | SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4) | 40 | SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4) |
42 | SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) | 41 | SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index a1444d0d08ee..423a4e2a77f7 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -41,7 +41,7 @@ sys_call_table32: | |||
41 | /*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending | 41 | /*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending |
42 | .word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid | 42 | .word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid |
43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall | 43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall |
44 | .word sys_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd | 44 | .word sys_getgroups, compat_sys_gettimeofday, compat_sys_getrusage, sys_nis_syscall, sys_getcwd |
45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod | 45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod |
46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate | 46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate |
47 | /*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall | 47 | /*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall |
diff --git a/kernel/compat.c b/kernel/compat.c index 19971d8c7299..c5620d6435e0 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -516,25 +516,6 @@ int put_compat_rusage(const struct rusage *r, struct compat_rusage __user *ru) | |||
516 | return 0; | 516 | return 0; |
517 | } | 517 | } |
518 | 518 | ||
519 | asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru) | ||
520 | { | ||
521 | struct rusage r; | ||
522 | int ret; | ||
523 | mm_segment_t old_fs = get_fs(); | ||
524 | |||
525 | set_fs(KERNEL_DS); | ||
526 | ret = sys_getrusage(who, (struct rusage __user *) &r); | ||
527 | set_fs(old_fs); | ||
528 | |||
529 | if (ret) | ||
530 | return ret; | ||
531 | |||
532 | if (put_compat_rusage(&r, ru)) | ||
533 | return -EFAULT; | ||
534 | |||
535 | return 0; | ||
536 | } | ||
537 | |||
538 | COMPAT_SYSCALL_DEFINE4(wait4, | 519 | COMPAT_SYSCALL_DEFINE4(wait4, |
539 | compat_pid_t, pid, | 520 | compat_pid_t, pid, |
540 | compat_uint_t __user *, stat_addr, | 521 | compat_uint_t __user *, stat_addr, |
diff --git a/kernel/sys.c b/kernel/sys.c index 81f56445fba9..fd2b5259ad7a 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1784,6 +1784,20 @@ SYSCALL_DEFINE2(getrusage, int, who, struct rusage __user *, ru) | |||
1784 | return getrusage(current, who, ru); | 1784 | return getrusage(current, who, ru); |
1785 | } | 1785 | } |
1786 | 1786 | ||
1787 | #ifdef CONFIG_COMPAT | ||
1788 | COMPAT_SYSCALL_DEFINE2(getrusage, int, who, struct compat_rusage __user *, ru) | ||
1789 | { | ||
1790 | struct rusage r; | ||
1791 | |||
1792 | if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN && | ||
1793 | who != RUSAGE_THREAD) | ||
1794 | return -EINVAL; | ||
1795 | |||
1796 | k_getrusage(current, who, &r); | ||
1797 | return put_compat_rusage(&r, ru); | ||
1798 | } | ||
1799 | #endif | ||
1800 | |||
1787 | SYSCALL_DEFINE1(umask, int, mask) | 1801 | SYSCALL_DEFINE1(umask, int, mask) |
1788 | { | 1802 | { |
1789 | mask = xchg(¤t->fs->umask, mask & S_IRWXUGO); | 1803 | mask = xchg(¤t->fs->umask, mask & S_IRWXUGO); |