From: "tip-bot2 for Borislav Petkov (AMD)" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/srso: Correct the mitigation status when SMT is disabled
Date: Fri, 18 Aug 2023 10:59:39 -0000 [thread overview]
Message-ID: <169235637927.27769.12345029773512843447.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230814200813.p5czl47zssuej7nv@treble>
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 6405b72e8d17bd1875a56ae52d23ec3cd51b9d66
Gitweb: https://git.kernel.org/tip/6405b72e8d17bd1875a56ae52d23ec3cd51b9d66
Author: Borislav Petkov (AMD) <bp@alien8.de>
AuthorDate: Tue, 15 Aug 2023 11:53:13 +02:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Fri, 18 Aug 2023 12:43:10 +02:00
x86/srso: Correct the mitigation status when SMT is disabled
Specify how is SRSO mitigated when SMT is disabled. Also, correct the
SMT check for that.
Fixes: e9fbc47b818b ("x86/srso: Disable the mitigation on unaffected configurations")
Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/20230814200813.p5czl47zssuej7nv@treble
---
arch/x86/kernel/cpu/bugs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 9026e3f..f081d26 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2428,8 +2428,7 @@ static void __init srso_select_mitigation(void)
* Zen1/2 with SMT off aren't vulnerable after the right
* IBPB microcode has been applied.
*/
- if ((boot_cpu_data.x86 < 0x19) &&
- (!cpu_smt_possible() || (cpu_smt_control == CPU_SMT_DISABLED))) {
+ if (boot_cpu_data.x86 < 0x19 && !cpu_smt_possible()) {
setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
return;
}
@@ -2714,7 +2713,7 @@ static ssize_t retbleed_show_state(char *buf)
static ssize_t srso_show_state(char *buf)
{
if (boot_cpu_has(X86_FEATURE_SRSO_NO))
- return sysfs_emit(buf, "Not affected\n");
+ return sysfs_emit(buf, "Mitigation: SMT disabled\n");
return sysfs_emit(buf, "%s%s\n",
srso_strings[srso_mitigation],
next prev parent reply other threads:[~2023-08-18 11:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-13 10:45 [PATCH] x86/srso: Disable the mitigation on unaffected configurations Borislav Petkov
2023-08-14 6:39 ` Nikolay Borisov
2023-08-14 20:08 ` Josh Poimboeuf
2023-08-14 20:25 ` Borislav Petkov
2023-08-14 20:53 ` Josh Poimboeuf
2023-08-14 21:17 ` Borislav Petkov
2023-08-15 9:57 ` [PATCH] x86/srso: Correct the mitigation status when SMT is disabled Borislav Petkov
2023-08-15 19:58 ` Josh Poimboeuf
2023-08-15 20:17 ` Borislav Petkov
2023-08-15 21:27 ` Josh Poimboeuf
2023-08-16 8:30 ` Borislav Petkov
2023-08-16 16:07 ` Josh Poimboeuf
2023-08-16 17:35 ` Borislav Petkov
2023-08-16 18:29 ` Josh Poimboeuf
2023-08-16 18:58 ` Borislav Petkov
2023-08-17 9:07 ` Borislav Petkov
2023-08-17 14:54 ` Josh Poimboeuf
2023-08-18 10:59 ` tip-bot2 for Borislav Petkov (AMD) [this message]
2023-08-14 9:37 ` [tip: x86/urgent] x86/srso: Disable the mitigation on unaffected configurations tip-bot2 for Borislav Petkov (AMD)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=169235637927.27769.12345029773512843447.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®