]>
Commit | Line | Data |
---|---|---|
1f91e7a4 GKH |
1 | From foo@baz Tue 14 May 2019 08:29:35 PM CEST |
2 | From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
3 | Date: Fri, 12 Apr 2019 17:50:58 -0400 | |
4 | Subject: x86/speculation/mds: Print SMT vulnerable on MSBDS with mitigations off | |
5 | ||
6 | From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
7 | ||
8 | commit e2c3c94788b08891dcf3dbe608f9880523ecd71b upstream. | |
9 | ||
10 | This code is only for CPUs which are affected by MSBDS, but are *not* | |
11 | affected by the other two MDS issues. | |
12 | ||
13 | For such CPUs, enabling the mds_idle_clear mitigation is enough to | |
14 | mitigate SMT. | |
15 | ||
16 | However if user boots with 'mds=off' and still has SMT enabled, we should | |
17 | not report that SMT is mitigated: | |
18 | ||
19 | $cat /sys//devices/system/cpu/vulnerabilities/mds | |
20 | Vulnerable; SMT mitigated | |
21 | ||
22 | But rather: | |
23 | Vulnerable; SMT vulnerable | |
24 | ||
25 | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
26 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | |
27 | Reviewed-by: Tyler Hicks <tyhicks@canonical.com> | |
28 | Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> | |
29 | Link: https://lkml.kernel.org/r/20190412215118.294906495@localhost.localdomain | |
30 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | |
31 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
32 | --- | |
33 | arch/x86/kernel/cpu/bugs.c | 3 ++- | |
34 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
35 | ||
36 | --- a/arch/x86/kernel/cpu/bugs.c | |
37 | +++ b/arch/x86/kernel/cpu/bugs.c | |
38 | @@ -1091,7 +1091,8 @@ static ssize_t mds_show_state(char *buf) | |
39 | ||
40 | if (boot_cpu_has(X86_BUG_MSBDS_ONLY)) { | |
41 | return sprintf(buf, "%s; SMT %s\n", mds_strings[mds_mitigation], | |
42 | - sched_smt_active() ? "mitigated" : "disabled"); | |
43 | + (mds_mitigation == MDS_MITIGATION_OFF ? "vulnerable" : | |
44 | + sched_smt_active() ? "mitigated" : "disabled")); | |
45 | } | |
46 | ||
47 | return sprintf(buf, "%s; SMT %s\n", mds_strings[mds_mitigation], |