Skip to content

Commit 1dc6ff0

Browse files
jpoimboeKAGA-KOKO
authored andcommitted
x86/speculation/mmio: Print SMT warning
Similar to MDS and TAA, print a warning if SMT is enabled for the MMIO Stale Data vulnerability. Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 027bbb8 commit 1dc6ff0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,7 @@ static void update_mds_branch_idle(void)
12581258

12591259
#define MDS_MSG_SMT "MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.\n"
12601260
#define TAA_MSG_SMT "TAA CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html for more details.\n"
1261+
#define MMIO_MSG_SMT "MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.\n"
12611262

12621263
void cpu_bugs_smt_update(void)
12631264
{
@@ -1302,6 +1303,16 @@ void cpu_bugs_smt_update(void)
13021303
break;
13031304
}
13041305

1306+
switch (mmio_mitigation) {
1307+
case MMIO_MITIGATION_VERW:
1308+
case MMIO_MITIGATION_UCODE_NEEDED:
1309+
if (sched_smt_active())
1310+
pr_warn_once(MMIO_MSG_SMT);
1311+
break;
1312+
case MMIO_MITIGATION_OFF:
1313+
break;
1314+
}
1315+
13051316
mutex_unlock(&spec_ctrl_mutex);
13061317
}
13071318

0 commit comments

Comments
 (0)