s390: add automatic detection of the spectre defense
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Apr 2018 05:36:53 +0000 (07:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Apr 2018 09:31:59 +0000 (11:31 +0200)
commit3e17958c6b3159cebc09f24344176e9a12b15e30
tree3778607d6f0338c5df36a5ba9e1b8f4c982de329
parent2afb4e9dfc0a44a4b616e4461fbf972e5ad4b0fe
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