aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/alternative.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2018-03-23 13:04:49 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-03-28 08:38:24 +0200
commit6e179d64126b909f0b288fa63cdbf07c531e9b1d (patch)
treed3b27e05dca18c669c42ba1b7833179c1b83a273 /arch/s390/kernel/alternative.c
parents390: move nobp parameter functions to nospec-branch.c (diff)
downloadlinux-dev-6e179d64126b909f0b288fa63cdbf07c531e9b1d.tar.xz
linux-dev-6e179d64126b909f0b288fa63cdbf07c531e9b1d.zip
s390: add automatic detection of the spectre defense
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>
Diffstat (limited to 'arch/s390/kernel/alternative.c')
-rw-r--r--arch/s390/kernel/alternative.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/alternative.c b/arch/s390/kernel/alternative.c
index 1abf4f35d059..8e1f2aee85ef 100644
--- a/arch/s390/kernel/alternative.c
+++ b/arch/s390/kernel/alternative.c
@@ -2,6 +2,7 @@
#include <linux/module.h>
#include <asm/alternative.h>
#include <asm/facility.h>
+#include <asm/nospec-branch.h>
#define MAX_PATCH_LEN (255 - 1)