linux-stable/arch/s390
Martin Schwidefsky f19fbd5ed6 s390: introduce execute-trampolines for branches
Add CONFIG_EXPOLINE to enable the use of the new -mindirect-branch= and
-mfunction_return= compiler options to create a kernel fortified against
the specte v2 attack.

With CONFIG_EXPOLINE=y all indirect branches will be issued with an
execute type instruction. For z10 or newer the EXRL instruction will
be used, for older machines the EX instruction. The typical indirect
call

	basr	%r14,%r1

is replaced with a PC relative call to a new thunk

	brasl	%r14,__s390x_indirect_jump_r1

The thunk contains the EXRL/EX instruction to the indirect branch

__s390x_indirect_jump_r1:
	exrl	0,0f
	j	.
0:	br	%r1

The detour via the execute type instruction has a performance impact.
To get rid of the detour the new kernel parameter "nospectre_v2" and
"spectre_v2=[on,off,auto]" can be used. If the parameter is specified
the kernel and module code will be patched at runtime.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-02-07 15:57:02 +01:00
..
appldata s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
boot s390/decompressor: discard __ksymtab and .eh_frame sections 2018-01-23 07:36:54 +01:00
configs firmware: Drop FIRMWARE_IN_KERNEL Kconfig option 2018-01-25 12:46:30 +01:00
crypto crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
hypfs s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
include s390: introduce execute-trampolines for branches 2018-02-07 15:57:02 +01:00
kernel s390: introduce execute-trampolines for branches 2018-02-07 15:57:02 +01:00
kvm KVM: s390: another fix for cmma migration 2018-01-24 16:25:53 +01:00
lib s390: fix preemption race in disable_sacf_uaccess 2017-12-15 15:05:21 +01:00
mm s390/mm: fix off-by-one bug in 5-level page table handling 2017-12-05 07:51:09 +01:00
net bpf, s390x: remove obsolete exception handling from div/mod 2018-01-26 16:42:06 -08:00
numa s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +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: handle insufficient resources during dma tlb flush 2017-12-13 10:51:33 +01:00
tools s390/tools: generate header files in arch/s390/include/generated/ 2018-01-23 07:36:53 +01:00
defconfig s390: update defconfig 2017-10-16 08:19:28 +02:00
Kbuild s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
Kconfig s390: introduce execute-trampolines for branches 2018-02-07 15:57:02 +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: introduce execute-trampolines for branches 2018-02-07 15:57:02 +01:00