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.c17
-rw-r--r--arch/s390/kernel/compat_linux.h1
-rw-r--r--arch/s390/kernel/compat_wrapper.S8
-rw-r--r--arch/s390/kernel/entry.h3
-rw-r--r--arch/s390/kernel/process.c10
-rw-r--r--arch/s390/kernel/syscalls.S2
6 files changed, 13 insertions, 28 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 9ab188d67a3d..f741cd49111a 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -801,23 +801,6 @@ asmlinkage long sys32_write(unsigned int fd, char __user * buf, size_t count)
801 return sys_write(fd, buf, count); 801 return sys_write(fd, buf, count);
802} 802}
803 803
804asmlinkage long sys32_clone(void)
805{
806 struct pt_regs *regs = task_pt_regs(current);
807 unsigned long clone_flags;
808 unsigned long newsp;
809 int __user *parent_tidptr, *child_tidptr;
810
811 clone_flags = regs->gprs[3] & 0xffffffffUL;
812 newsp = regs->orig_gpr2 & 0x7fffffffUL;
813 parent_tidptr = compat_ptr(regs->gprs[4]);
814 child_tidptr = compat_ptr(regs->gprs[5]);
815 if (!newsp)
816 newsp = regs->gprs[15];
817 return do_fork(clone_flags, newsp, regs, 0,
818 parent_tidptr, child_tidptr);
819}
820
821/* 804/*
822 * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64. 805 * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64.
823 * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE} 806 * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE}
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
index 836a28842900..7cceb67ff8a2 100644
--- a/arch/s390/kernel/compat_linux.h
+++ b/arch/s390/kernel/compat_linux.h
@@ -222,7 +222,6 @@ unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg);
222long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg); 222long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg);
223long sys32_read(unsigned int fd, char __user * buf, size_t count); 223long sys32_read(unsigned int fd, char __user * buf, size_t count);
224long sys32_write(unsigned int fd, char __user * buf, size_t count); 224long sys32_write(unsigned int fd, char __user * buf, size_t count);
225long sys32_clone(void);
226long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); 225long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise);
227long sys32_fadvise64_64(struct fadvise64_64_args __user *args); 226long sys32_fadvise64_64(struct fadvise64_64_args __user *args);
228long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, 227long sys32_sigaction(int sig, const struct old_sigaction32 __user *act,
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 624790042d41..28f8440d2ec3 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1840,3 +1840,11 @@ sys_perf_event_open_wrapper:
1840 lgfr %r5,%r5 # int 1840 lgfr %r5,%r5 # int
1841 llgfr %r6,%r6 # unsigned long 1841 llgfr %r6,%r6 # unsigned long
1842 jg sys_perf_event_open # branch to system call 1842 jg sys_perf_event_open # branch to system call
1843
1844 .globl sys_clone_wrapper
1845sys_clone_wrapper:
1846 llgfr %r2,%r2 # unsigned long
1847 llgfr %r3,%r3 # unsigned long
1848 llgtr %r4,%r4 # int *
1849 llgtr %r5,%r5 # int *
1850 jg sys_clone # branch to system call
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index 950c59c6688b..91fd78839c57 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -42,7 +42,8 @@ long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args);
42long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, 42long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high,
43 u32 len_low); 43 u32 len_low);
44long sys_fork(void); 44long sys_fork(void);
45long sys_clone(void); 45long sys_clone(unsigned long newsp, unsigned long clone_flags,
46 int __user *parent_tidptr, int __user *child_tidptr);
46long sys_vfork(void); 47long sys_vfork(void);
47void execve_tail(void); 48void execve_tail(void);
48long sys_execve(void); 49long sys_execve(void);
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 5a43f27eec13..189d978f76d6 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -230,17 +230,11 @@ SYSCALL_DEFINE0(fork)
230 return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); 230 return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL);
231} 231}
232 232
233SYSCALL_DEFINE0(clone) 233SYSCALL_DEFINE4(clone, unsigned long, newsp, unsigned long, clone_flags,
234 int __user *, parent_tidptr, int __user *, child_tidptr)
234{ 235{
235 struct pt_regs *regs = task_pt_regs(current); 236 struct pt_regs *regs = task_pt_regs(current);
236 unsigned long clone_flags;
237 unsigned long newsp;
238 int __user *parent_tidptr, *child_tidptr;
239 237
240 clone_flags = regs->gprs[3];
241 newsp = regs->orig_gpr2;
242 parent_tidptr = (int __user *) regs->gprs[4];
243 child_tidptr = (int __user *) regs->gprs[5];
244 if (!newsp) 238 if (!newsp)
245 newsp = regs->gprs[15]; 239 newsp = regs->gprs[15];
246 return do_fork(clone_flags, newsp, regs, 0, 240 return do_fork(clone_flags, newsp, regs, 0,
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 0b5083681e77..ff79d58e0eb3 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -128,7 +128,7 @@ SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper)
128SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) 128SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper)
129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) 129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper)
130SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) 130SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn)
131SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */ 131SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */
132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) 132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper)
133SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper) 133SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper)
134NI_SYSCALL /* modify_ldt for i386 */ 134NI_SYSCALL /* modify_ldt for i386 */