From: Michael Holzheu Date: Fri, 23 Jan 2009 15:40:24 +0000 (+0100) Subject: [S390] fix compat sigaltstack syscall table entry X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e9a4e9d563ea643d305b5fe83031d7deca311db3;p=openwrt%2Fstaging%2Fblogic.git [S390] fix compat sigaltstack syscall table entry When 31 bit user space programs call sigaltstack on a 64 bit Linux OS, the system call returns -1 with errno=EFAULT. The 31 bit pointer passed to the system call is extended to 64 bit, but the high order bits are not set to zero. The kernel detects the invalid user space pointer and returns -EFAULT. To solve the problem, sys32_sigaltstack_wrapper() instead of sys32_sigaltstack() has to be called. The wrapper function sets the high order bits to zero. Signed-off-by: Michael Holzheu Signed-off-by: Heiko Carstens --- diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 76d16e0140bb..3e18d8a5e614 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S @@ -194,7 +194,7 @@ SYSCALL(sys_chown16,sys_ni_syscall,sys32_chown16_wrapper) /* old chown16 syscall SYSCALL(sys_getcwd,sys_getcwd,sys32_getcwd_wrapper) SYSCALL(sys_capget,sys_capget,sys32_capget_wrapper) SYSCALL(sys_capset,sys_capset,sys32_capset_wrapper) /* 185 */ -SYSCALL(sys_sigaltstack,sys_sigaltstack,sys32_sigaltstack) +SYSCALL(sys_sigaltstack,sys_sigaltstack,sys32_sigaltstack_wrapper) SYSCALL(sys_sendfile,sys_sendfile64,sys32_sendfile_wrapper) NI_SYSCALL /* streams1 */ NI_SYSCALL /* streams2 */