aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/compat_linux.c61
-rw-r--r--arch/s390/kernel/compat_wrapper.S8
-rw-r--r--arch/s390/kernel/syscalls.S2
3 files changed, 5 insertions, 66 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 9809264f2f4d..5e14de37c17b 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -26,7 +26,6 @@
26#include <linux/resource.h> 26#include <linux/resource.h>
27#include <linux/times.h> 27#include <linux/times.h>
28#include <linux/utsname.h> 28#include <linux/utsname.h>
29#include <linux/timex.h>
30#include <linux/smp.h> 29#include <linux/smp.h>
31#include <linux/smp_lock.h> 30#include <linux/smp_lock.h>
32#include <linux/sem.h> 31#include <linux/sem.h>
@@ -705,66 +704,6 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
705 return ret; 704 return ret;
706} 705}
707 706
708/* Handle adjtimex compatibility. */
709
710extern int do_adjtimex(struct timex *);
711
712asmlinkage long sys32_adjtimex(struct compat_timex __user *utp)
713{
714 struct timex txc;
715 int ret;
716
717 memset(&txc, 0, sizeof(struct timex));
718
719 if(get_user(txc.modes, &utp->modes) ||
720 __get_user(txc.offset, &utp->offset) ||
721 __get_user(txc.freq, &utp->freq) ||
722 __get_user(txc.maxerror, &utp->maxerror) ||
723 __get_user(txc.esterror, &utp->esterror) ||
724 __get_user(txc.status, &utp->status) ||
725 __get_user(txc.constant, &utp->constant) ||
726 __get_user(txc.precision, &utp->precision) ||
727 __get_user(txc.tolerance, &utp->tolerance) ||
728 __get_user(txc.time.tv_sec, &utp->time.tv_sec) ||
729 __get_user(txc.time.tv_usec, &utp->time.tv_usec) ||
730 __get_user(txc.tick, &utp->tick) ||
731 __get_user(txc.ppsfreq, &utp->ppsfreq) ||
732 __get_user(txc.jitter, &utp->jitter) ||
733 __get_user(txc.shift, &utp->shift) ||
734 __get_user(txc.stabil, &utp->stabil) ||
735 __get_user(txc.jitcnt, &utp->jitcnt) ||
736 __get_user(txc.calcnt, &utp->calcnt) ||
737 __get_user(txc.errcnt, &utp->errcnt) ||
738 __get_user(txc.stbcnt, &utp->stbcnt))
739 return -EFAULT;
740
741 ret = do_adjtimex(&txc);
742
743 if(put_user(txc.modes, &utp->modes) ||
744 __put_user(txc.offset, &utp->offset) ||
745 __put_user(txc.freq, &utp->freq) ||
746 __put_user(txc.maxerror, &utp->maxerror) ||
747 __put_user(txc.esterror, &utp->esterror) ||
748 __put_user(txc.status, &utp->status) ||
749 __put_user(txc.constant, &utp->constant) ||
750 __put_user(txc.precision, &utp->precision) ||
751 __put_user(txc.tolerance, &utp->tolerance) ||
752 __put_user(txc.time.tv_sec, &utp->time.tv_sec) ||
753 __put_user(txc.time.tv_usec, &utp->time.tv_usec) ||
754 __put_user(txc.tick, &utp->tick) ||
755 __put_user(txc.ppsfreq, &utp->ppsfreq) ||
756 __put_user(txc.jitter, &utp->jitter) ||
757 __put_user(txc.shift, &utp->shift) ||
758 __put_user(txc.stabil, &utp->stabil) ||
759 __put_user(txc.jitcnt, &utp->jitcnt) ||
760 __put_user(txc.calcnt, &utp->calcnt) ||
761 __put_user(txc.errcnt, &utp->errcnt) ||
762 __put_user(txc.stbcnt, &utp->stbcnt))
763 ret = -EFAULT;
764
765 return ret;
766}
767
768#ifdef CONFIG_SYSCTL 707#ifdef CONFIG_SYSCTL
769struct __sysctl_args32 { 708struct __sysctl_args32 {
770 u32 name; 709 u32 name;
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 50e80138e7ad..199da68bd7be 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -551,10 +551,10 @@ sys32_newuname_wrapper:
551 llgtr %r2,%r2 # struct new_utsname * 551 llgtr %r2,%r2 # struct new_utsname *
552 jg s390x_newuname # branch to system call 552 jg s390x_newuname # branch to system call
553 553
554 .globl sys32_adjtimex_wrapper 554 .globl compat_sys_adjtimex_wrapper
555sys32_adjtimex_wrapper: 555compat_sys_adjtimex_wrapper:
556 llgtr %r2,%r2 # struct timex_emu31 * 556 llgtr %r2,%r2 # struct compat_timex *
557 jg sys32_adjtimex # branch to system call 557 jg compat_sys_adjtimex # branch to system call
558 558
559 .globl sys32_mprotect_wrapper 559 .globl sys32_mprotect_wrapper
560sys32_mprotect_wrapper: 560sys32_mprotect_wrapper:
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 7c88d85c3597..2f56654da821 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -132,7 +132,7 @@ SYSCALL(sys_clone_glue,sys_clone_glue,sys32_clone_glue) /* 120 */
132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) 132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper)
133SYSCALL(sys_newuname,s390x_newuname,sys32_newuname_wrapper) 133SYSCALL(sys_newuname,s390x_newuname,sys32_newuname_wrapper)
134NI_SYSCALL /* modify_ldt for i386 */ 134NI_SYSCALL /* modify_ldt for i386 */
135SYSCALL(sys_adjtimex,sys_adjtimex,sys32_adjtimex_wrapper) 135SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper)
136SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ 136SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */
137SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) 137SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper)
138NI_SYSCALL /* old "create module" */ 138NI_SYSCALL /* old "create module" */