lkml.org 
[lkml]   [2019]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [tip: x86/pti] x86/speculation: Fix redundant MDS mitigation message
On Sat, Nov 16, 2019 at 12:25:19PM -0000, tip-bot2 for Waiman Long wrote:
> +static void __init mds_print_mitigation(void)
> +{
> pr_info("%s\n", mds_strings[mds_mitigation]);
> }

Almost. This causes

MDS: Vulnerable

to be printed on an in-order 32-bit Atom here, which is wrong. I've
fixed it up to:

---
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index cb2fbd93ef4d..8bf64899f56a 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -256,6 +256,9 @@ static void __init mds_select_mitigation(void)

static void __init mds_print_mitigation(void)
{
+ if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off())
+ return;
+
pr_info("%s\n", mds_strings[mds_mitigation]);
}

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2019-11-16 15:24    [W:0.446 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site