summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/compat.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2012-11-07 10:44:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 11:38:01 -0800
commit37a42f991f36aae9b064bc3f39b760006bd17131 (patch)
tree2538c3374aac7fd8aa9bdbe5fae11c6f6869c02d /arch/s390/include/asm/compat.h
parent39220c9e67cbfbc1a7ac17a51afd77eb06b62fa9 (diff)
downloadlwn-37a42f991f36aae9b064bc3f39b760006bd17131.tar.gz
lwn-37a42f991f36aae9b064bc3f39b760006bd17131.zip
s390/signal: set correct address space control
commit fa968ee215c0ca91e4a9c3a69ac2405aae6e5d2f upstream. If user space is running in primary mode it can switch to secondary or access register mode, this is used e.g. in the clock_gettime code of the vdso. If a signal is delivered to the user space process while it has been running in access register mode the signal handler is executed in access register mode as well which will result in a crash most of the time. Set the address space control bits in the PSW to the default for the execution of the signal handler and make sure that the previous address space control is restored on signal return. Take care that user space can not switch to the kernel address space by modifying the registers in the signal frame. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390/include/asm/compat.h')
-rw-r--r--arch/s390/include/asm/compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h
index 234f1d859cea..2e0a15b4359c 100644
--- a/arch/s390/include/asm/compat.h
+++ b/arch/s390/include/asm/compat.h
@@ -20,7 +20,7 @@
#define PSW32_MASK_CC 0x00003000UL
#define PSW32_MASK_PM 0x00000f00UL
-#define PSW32_MASK_USER 0x00003F00UL
+#define PSW32_MASK_USER 0x0000FF00UL
#define PSW32_ADDR_AMODE 0x80000000UL
#define PSW32_ADDR_INSN 0x7FFFFFFFUL