s390: add automatic detection of the spectre defense
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Apr 2018 05:36:39 +0000 (07:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Apr 2018 09:33:15 +0000 (11:33 +0200)
commit719b84c9aec27953da3da75838f50fd89ea950a2
treeb8c95ac751b034e59d6bb8a10ea40290af214932
parentea1bbd53f0558fa625f07fd69f5dbb58cbb8a95c
s390: add automatic detection of the spectre defense

[ Upstream commit 6e179d64126b909f0b288fa63cdbf07c531e9b1d ]

Automatically decide between nobp vs. expolines if the spectre_v2=auto
kernel parameter is specified or CONFIG_EXPOLINE_AUTO=y is set.

The decision made at boot time due to CONFIG_EXPOLINE_AUTO=y being set
can be overruled with the nobp, nospec and spectre_v2 kernel parameters.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/Kconfig
arch/s390/Makefile
arch/s390/include/asm/nospec-branch.h
arch/s390/kernel/alternative.c
arch/s390/kernel/module.c
arch/s390/kernel/nospec-branch.c