Skip to content

Commit dfa8865

Browse files
dmcraciunmpe
authored andcommitted
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>
1 parent 3bc8ea8 commit dfa8865

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/powerpc/kernel/security.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,11 @@ ssize_t cpu_show_spectre_v2(struct device *dev, struct device_attribute *attr, c
213213

214214
if (count_cache_flush_type == COUNT_CACHE_FLUSH_HW)
215215
seq_buf_printf(&s, "(hardware accelerated)");
216-
} else
216+
} else if (btb_flush_enabled) {
217+
seq_buf_printf(&s, "Mitigation: Branch predictor state flush");
218+
} else {
217219
seq_buf_printf(&s, "Vulnerable");
220+
}
218221

219222
seq_buf_printf(&s, "\n");
220223

0 commit comments

Comments
 (0)