aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/security.c
diff options
context:
space:
mode:
authorGravatar Diana Craciun <diana.craciun@nxp.com> 2018-12-12 16:03:09 +0200
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2018-12-20 22:59:03 +1100
commitdfa88658fb0583abb92e062c7a9cd5a5b94f2a46 (patch)
tree04fdb2c08d9067be87ac9936a71db306baff6b29 /arch/powerpc/kernel/security.c
parentpowerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used (diff)
downloadlinux-dfa88658fb0583abb92e062c7a9cd5a5b94f2a46.tar.gz
linux-dfa88658fb0583abb92e062c7a9cd5a5b94f2a46.tar.bz2
linux-dfa88658fb0583abb92e062c7a9cd5a5b94f2a46.zip
powerpc/fsl: Update Spectre v2 reporting
Report branch predictor state flush as a mitigation for Spectre variant 2. Signed-off-by: Diana Craciun <diana.craciun@nxp.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/security.c')
-rw-r--r--arch/powerpc/kernel/security.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
index 9ab771b1aebb..9b8631533e02 100644
--- a/arch/powerpc/kernel/security.c
+++ b/arch/powerpc/kernel/security.c
@@ -213,8 +213,11 @@ ssize_t cpu_show_spectre_v2(struct device *dev, struct device_attribute *attr, c
if (count_cache_flush_type == COUNT_CACHE_FLUSH_HW)
seq_buf_printf(&s, "(hardware accelerated)");
- } else
+ } else if (btb_flush_enabled) {
+ seq_buf_printf(&s, "Mitigation: Branch predictor state flush");
+ } else {
seq_buf_printf(&s, "Vulnerable");
+ }
seq_buf_printf(&s, "\n");