Similar to MDS and TAA, print a warning if SMT is enabled for the MMIO Stale Data vulnerability.
Unified · Split
| @@ -1258,6 +1258,7 @@ static void update_mds_branch_idle(void) · 1257 unmodified lines | ||
| 1258 | 1258 | |
| 1259 | 1259 | #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" |
| 1260 | 1260 | #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" | |
| 1261 | 1262 | |
| 1262 | 1263 | void cpu_bugs_smt_update(void) |
| 1263 | 1264 | { |
| @@ -1302,6 +1303,16 @@ void cpu_bugs_smt_update(void) · 38 unmodified lines | ||
| 1302 | 1303 | break; |
| 1303 | 1304 | } |
| 1304 | 1305 | |
| 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 | + | |
| 1305 | 1316 | mutex_unlock(&spec_ctrl_mutex); |
| 1306 | 1317 | } |
| 1307 | 1318 | |