]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
s390/signal: set correct address space control
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 7 Nov 2012 09:44:08 +0000 (10:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 20:14:21 +0000 (12:14 -0800)
commit38efab61680204d6f7cedfbacdc211ab1cfe0806
treeff9ab72b7562be36394a93d53e45ef6d379be9dd
parentd3230589b189623d8d79fd56826001a8076ac5a6
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>
arch/s390/include/asm/compat.h
arch/s390/include/asm/ptrace.h
arch/s390/kernel/compat_signal.c
arch/s390/kernel/signal.c