linux/arch/s390
Heiko Carstens d0e810eeb3 s390/noexec: execute kexec datamover without DAT
Rebooting into a new kernel with kexec fails (system dies) if tried on
a machine that has no-execute support. Reason for this is that the so
called datamover code gets executed with DAT on (MMU is active) and
the page that contains the datamover is marked as non-executable.
Therefore when branching into the datamover an unexpected program
check happens and afterwards the machine is dead.

This can be simply avoided by disabling DAT, which also disables any
no-execute checks, just before the datamover gets executed.

In fact the first thing done by the datamover is to disable DAT. The
code in the datamover that disables DAT can be removed as well.

Thanks to Michael Holzheu and Gerald Schaefer for tracking this down.

Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Fixes: 57d7f939e7 ("s390: add no-execute support")
Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2017-11-10 18:58:08 +01:00
..
appldata sched/headers: Move task statistics APIs from <linux/sched.h> to <linux/sched/stat.h> 2017-03-03 01:43:43 +01:00
boot s390/decompressor: remove informational messages 2017-10-26 16:44:59 +02:00
configs s390: update defconfig 2017-10-16 08:19:28 +02:00
crypto s390/crypto: add s390 platform specific aes gcm support. 2017-09-29 15:51:25 +02:00
hypfs s390: hypfs: make inode explicitly non-modular 2016-10-31 17:55:40 +01:00
include s390: fix transactional execution control register handling 2017-11-10 18:58:00 +01:00
kernel s390/noexec: execute kexec datamover without DAT 2017-11-10 18:58:08 +01:00
kvm s390/ctl_reg: move control register definitions to ctl_reg.h 2017-10-19 17:07:37 +02:00
lib s390/spinlock: use cpu alternatives to enable niai instruction 2017-10-18 14:11:33 +02:00
mm s390: avoid undefined behaviour 2017-11-08 22:11:20 +01:00
net s390/bpf: take advantage of stack_depth tracking 2017-11-10 18:57:37 +01:00
numa s390/numa: pin all possible cpus to nodes early 2016-12-07 07:23:33 +01:00
oprofile s390/dumpstack: restore reliable indicator for call traces 2016-10-17 14:44:30 +02:00
pci s390/pci: do not require AIS facility 2017-11-08 09:47:39 +01:00
tools s390/disassembler: generate opcode tables from text file 2017-11-08 22:11:02 +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: remove named saved segment support 2017-11-08 09:47:54 +01:00
Kconfig.debug Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-02-22 10:20:04 -08:00
Makefile s390/disassembler: generate opcode tables from text file 2017-11-08 22:11:02 +01:00