diff options
| -rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 3f934ffef8cf..22a14d4b68a2 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
| @@ -673,6 +673,9 @@ static void update_indir_branch_cond(void) | |||
| 673 | static_branch_disable(&switch_to_cond_stibp); | 673 | static_branch_disable(&switch_to_cond_stibp); |
| 674 | } | 674 | } |
| 675 | 675 | ||
| 676 | #undef pr_fmt | ||
| 677 | #define pr_fmt(fmt) fmt | ||
| 678 | |||
| 676 | /* Update the static key controlling the MDS CPU buffer clear in idle */ | 679 | /* Update the static key controlling the MDS CPU buffer clear in idle */ |
| 677 | static void update_mds_branch_idle(void) | 680 | static void update_mds_branch_idle(void) |
| 678 | { | 681 | { |
| @@ -693,6 +696,8 @@ static void update_mds_branch_idle(void) | |||
| 693 | static_branch_disable(&mds_idle_clear); | 696 | static_branch_disable(&mds_idle_clear); |
| 694 | } | 697 | } |
| 695 | 698 | ||
| 699 | #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" | ||
| 700 | |||
| 696 | void arch_smt_update(void) | 701 | void arch_smt_update(void) |
| 697 | { | 702 | { |
| 698 | /* Enhanced IBRS implies STIBP. No update required. */ | 703 | /* Enhanced IBRS implies STIBP. No update required. */ |
| @@ -717,6 +722,8 @@ void arch_smt_update(void) | |||
| 717 | switch (mds_mitigation) { | 722 | switch (mds_mitigation) { |
| 718 | case MDS_MITIGATION_FULL: | 723 | case MDS_MITIGATION_FULL: |
| 719 | case MDS_MITIGATION_VMWERV: | 724 | case MDS_MITIGATION_VMWERV: |
| 725 | if (sched_smt_active() && !boot_cpu_has(X86_BUG_MSBDS_ONLY)) | ||
| 726 | pr_warn_once(MDS_MSG_SMT); | ||
| 720 | update_mds_branch_idle(); | 727 | update_mds_branch_idle(); |
| 721 | break; | 728 | break; |
| 722 | case MDS_MITIGATION_OFF: | 729 | case MDS_MITIGATION_OFF: |
| @@ -1149,6 +1156,7 @@ static int __init l1tf_cmdline(char *str) | |||
| 1149 | early_param("l1tf", l1tf_cmdline); | 1156 | early_param("l1tf", l1tf_cmdline); |
| 1150 | 1157 | ||
| 1151 | #undef pr_fmt | 1158 | #undef pr_fmt |
| 1159 | #define pr_fmt(fmt) fmt | ||
| 1152 | 1160 | ||
| 1153 | #ifdef CONFIG_SYSFS | 1161 | #ifdef CONFIG_SYSFS |
| 1154 | 1162 | ||
