]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kernel: add support for kernel address space layout randomization (KASLR)
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Sun, 3 Feb 2019 20:37:20 +0000 (21:37 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Apr 2019 08:47:10 +0000 (10:47 +0200)
commit483676a7029c8591715d58983f2bfae7eba7bd70
treeafc715c3029b79cf1430781ffcbe39ff0656cadb
parentfdb581f6cd22e1f62b2fe4e28dc9aeee30004d95
s390/kernel: add support for kernel address space layout randomization (KASLR)

This patch adds support for relocating the kernel to a random address.
The random kernel offset is obtained from cpacf, using either TRNG, PRNO,
or KMC_PRNG, depending on supported MSA level.

KERNELOFFSET is added to vmcoreinfo, for crash --kaslr support.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Kconfig
arch/s390/boot/Makefile
arch/s390/boot/boot.h
arch/s390/boot/ipl_parm.c
arch/s390/boot/kaslr.c [new file with mode: 0644]
arch/s390/boot/startup.c
arch/s390/include/asm/setup.h
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/setup.c