]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.arch/s390-08-04-compat-sigaltstack.diff
Added missing Xen Kernel Patches which were not commited because
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-08-04-compat-sigaltstack.diff
diff --git a/src/patches/suse-2.6.27.31/patches.arch/s390-08-04-compat-sigaltstack.diff b/src/patches/suse-2.6.27.31/patches.arch/s390-08-04-compat-sigaltstack.diff
new file mode 100644 (file)
index 0000000..5f227a7
--- /dev/null
@@ -0,0 +1,31 @@
+From: Gerald Schaefer <geraldsc@de.ibm.com>
+Subject: kernel: 31 bit compat sigaltstack syscall fails with -EFAULT.
+References: bnc#466462,LTC#50888
+
+Symptom:     When 31 bit user space programs call sigaltstack on a 64 bit Linux
+             OS, the system call returns -1 with errno=EFAULT.
+Problem:     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.
+Solution:    Call sys32_sigaltstack_wrapper() instead of sys32_sigaltstack().
+             The wrapper function sets the high order bits to zero.
+
+Acked-by: John Jolly <jjolly@suse.de>
+---
+ arch/s390/kernel/syscalls.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: linux-sles11/arch/s390/kernel/syscalls.S
+===================================================================
+--- linux-sles11.orig/arch/s390/kernel/syscalls.S
++++ linux-sles11/arch/s390/kernel/syscalls.S
+@@ -194,7 +194,7 @@ SYSCALL(sys_chown16,sys_ni_syscall,sys32
+ 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 */