aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/compat_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/compat_linux.c')
-rw-r--r--arch/s390/kernel/compat_linux.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index ed877d0f27e6..bf9a7a361b34 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -55,6 +55,7 @@
55#include <linux/syscalls.h> 55#include <linux/syscalls.h>
56#include <linux/sysctl.h> 56#include <linux/sysctl.h>
57#include <linux/binfmts.h> 57#include <linux/binfmts.h>
58#include <linux/capability.h>
58#include <linux/compat.h> 59#include <linux/compat.h>
59#include <linux/vfs.h> 60#include <linux/vfs.h>
60#include <linux/ptrace.h> 61#include <linux/ptrace.h>
@@ -279,7 +280,7 @@ asmlinkage long sys32_getegid16(void)
279 280
280static inline long get_tv32(struct timeval *o, struct compat_timeval *i) 281static inline long get_tv32(struct timeval *o, struct compat_timeval *i)
281{ 282{
282 return (!access_ok(VERIFY_READ, tv32, sizeof(*tv32)) || 283 return (!access_ok(VERIFY_READ, o, sizeof(*o)) ||
283 (__get_user(o->tv_sec, &i->tv_sec) || 284 (__get_user(o->tv_sec, &i->tv_sec) ||
284 __get_user(o->tv_usec, &i->tv_usec))); 285 __get_user(o->tv_usec, &i->tv_usec)));
285} 286}
@@ -1014,38 +1015,6 @@ asmlinkage long sys32_clone(struct pt_regs regs)
1014} 1015}
1015 1016
1016/* 1017/*
1017 * Wrapper function for sys_timer_create.
1018 */
1019extern asmlinkage long
1020sys_timer_create(clockid_t, struct sigevent *, timer_t *);
1021
1022asmlinkage long
1023sys32_timer_create(clockid_t which_clock, struct compat_sigevent *se32,
1024 timer_t *timer_id)
1025{
1026 struct sigevent se;
1027 timer_t ktimer_id;
1028 mm_segment_t old_fs;
1029 long ret;
1030
1031 if (se32 == NULL)
1032 return sys_timer_create(which_clock, NULL, timer_id);
1033
1034 if (get_compat_sigevent(&se, se32))
1035 return -EFAULT;
1036
1037 old_fs = get_fs();
1038 set_fs(KERNEL_DS);
1039 ret = sys_timer_create(which_clock, &se, &ktimer_id);
1040 set_fs(old_fs);
1041
1042 if (!ret)
1043 ret = put_user (ktimer_id, timer_id);
1044
1045 return ret;
1046}
1047
1048/*
1049 * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64. 1018 * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64.
1050 * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE} 1019 * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE}
1051 * because the 31 bit values differ from the 64 bit values. 1020 * because the 31 bit values differ from the 64 bit values.