linux-stable/arch/s390
Heiko Carstens fbbd7f1a51 s390: always save and restore all registers on context switch
The switch_to() macro has an optimization to avoid saving and
restoring register contents that aren't needed for kernel threads.

There is however the possibility that a kernel thread execve's a user
space program. In such a case the execve'd process can partially see
the contents of the previous process, which shouldn't be allowed.

To avoid this, simply always save and restore register contents on
context switch.

Cc: <stable@vger.kernel.org> # v2.6.37+
Fixes: fdb6d070ef ("switch_to: dont restore/save access & fpu regs for kernel threads")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-12-05 07:51:08 +01:00
..
appldata s390: appldata: add SPDX identifiers to the remaining files 2017-11-24 15:37:18 +01:00
boot s390: Remove redundant license text 2017-11-24 15:37:24 +01:00
configs s390: Remove CONFIG_HARDENED_USERCOPY 2017-11-16 13:12:21 +01:00
crypto s390: crypto: Remove redundant license text 2017-11-24 15:37:23 +01:00
hypfs s390: Remove redundant license text 2017-11-24 15:37:24 +01:00
include s390: always save and restore all registers on context switch 2017-12-05 07:51:08 +01:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-30 08:13:36 -08:00
kvm KVM: Let KVM_SET_SIGNAL_MASK work as advertised 2017-11-27 17:53:47 +01:00
lib s390/spinlock: fix indentation 2017-11-14 22:07:58 +01:00
mm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-30 08:13:36 -08:00
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
numa License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci s390: pci: add SPDX identifiers to the remaining files 2017-11-24 15:37:17 +01:00
tools s390: remove unused parameter from Makefile 2017-11-16 15:06:21 +01:00
defconfig s390: update defconfig 2017-10-16 08:19:28 +02:00
Kbuild s390/crypto: Provide s390 specific arch random functionality. 2017-04-26 13:41:35 +02:00
Kconfig s390/perf: add perf_regs support and user stack dump 2017-11-16 15:06:11 +01:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile s390: Remove redundant license text 2017-11-24 15:37:24 +01:00