From: "Shah, Amit" <Amit.Shah@amd.com>
To: "jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"bp@alien8.de" <bp@alien8.de>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
"pawan.kumar.gupta@linux.intel.com"
<pawan.kumar.gupta@linux.intel.com>,
"kai.huang@intel.com" <kai.huang@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
"daniel.sneddon@linux.intel.com" <daniel.sneddon@linux.intel.com>,
"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"seanjc@google.com" <seanjc@google.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"Moger, Babu" <Babu.Moger@amd.com>,
"Das1, Sandipan" <Sandipan.Das@amd.com>,
"dwmw@amazon.co.uk" <dwmw@amazon.co.uk>,
"amit@kernel.org" <amit@kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"Kaplan, David" <David.Kaplan@amd.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v2 1/2] x86/bugs: Don't fill RSB on VMEXIT with eIBRS+retpoline
Date: Mon, 2 Dec 2024 11:15:24 +0000 [thread overview]
Message-ID: <f43ebdd781d821d7fabdd85f1eebf8acd980566f.camel@amd.com> (raw)
In-Reply-To: <20241130153125.GBZ0svzaVIMOHBOBS2@fat_crate.local>
On Sat, 2024-11-30 at 16:31 +0100, Borislav Petkov wrote:
> On Thu, Nov 21, 2024 at 12:07:18PM -0800, Josh Poimboeuf wrote:
> > eIBRS protects against RSB underflow/poisoning attacks. Adding
> > retpoline to the mix doesn't change that. Retpoline has a balanced
> > CALL/RET anyway.
>
> This is exactly why I've been wanting for us to document our
> mitigations for
> a long time now.
FWIW, I'd say we have fairly decent documentation with commit messages
+ code + comments in code.
> A bunch of statements above for which I can only rhyme up they're
> correct if
> I search for the vendor docs. On the AMD side I've found:
[...]
> In any case, I'd like for us to do have a piece of text accompanying
> such
> patches, perhaps here:
>
> Documentation/admin-guide/hw-vuln/spectre.rst
>
> which quotes the vendor docs.
If you're saying that we need *additional* documentation that
replicates hw manuals and the knowledge we have in our commit + code +
comments, that I agree with.
I got the feeling earlier, though, that you were saying we need that
documentation *instead of* the current comments-within-code, and that
didn't sound like the right thing to do.
> The current thread(s) on the matter already show how much confused we
> all are
> by all the possible mitigation options, uarch speculative dances etc
> etc.
... and the code flows and looks much better after this commit (for
SpectreRSB at least), which is a huge plus.
It's important to note that at some point in the past we got
vulnerabilities and hw features/quirks one after the other, and we kept
tacking mitigation code on top of the existing one -- because that's
what you need to do during an embargo period. Now's the moment when
we're consolidating it all while taking stock of the overall situation.
This looks like a sound way to go about taking a higher-level view and
simplifying the code.
I doubt we'd want to do things any other way; and much less doing this
kind of an exercise during an embargo. Moving comments out of the code
will only add to frustration during embargo periods.
Just my 2c
Amit
next prev parent reply other threads:[~2024-12-02 11:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 20:07 [PATCH v2 0/2] x86/bugs: RSB tweaks Josh Poimboeuf
2024-11-21 20:07 ` [PATCH v2 1/2] x86/bugs: Don't fill RSB on VMEXIT with eIBRS+retpoline Josh Poimboeuf
2024-11-30 15:31 ` Borislav Petkov
2024-12-02 11:15 ` Shah, Amit [this message]
2024-12-02 12:19 ` Borislav Petkov
2024-12-02 23:35 ` Pawan Gupta
2024-12-03 11:20 ` Borislav Petkov
2024-12-05 23:12 ` Josh Poimboeuf
2024-12-21 9:13 ` Borislav Petkov
2025-04-02 9:19 ` Shah, Amit
2025-04-02 14:16 ` Josh Poimboeuf
2025-04-02 14:19 ` Shah, Amit
2024-12-05 23:13 ` Josh Poimboeuf
2024-11-21 20:07 ` [PATCH v2 2/2] x86/bugs: Don't fill RSB on context switch with eIBRS Josh Poimboeuf
2024-12-03 11:42 ` Borislav Petkov
2024-12-05 23:32 ` Josh Poimboeuf
2024-12-06 0:53 ` Josh Poimboeuf
2024-12-06 23:02 ` Josh Poimboeuf
2024-12-30 14:54 ` Shah, Amit
2025-01-08 11:50 ` Shah, Amit
2024-12-06 10:10 ` Shah, Amit
2024-12-09 20:46 ` jpoimboe
2024-11-28 13:28 ` [RFC PATCH v3 0/2] Add support for the ERAPS feature Amit Shah
2024-11-28 13:28 ` [RFC PATCH v3 1/2] x86: cpu/bugs: add AMD ERAPS support; hardware flushes RSB Amit Shah
2024-12-02 17:26 ` Dave Hansen
2024-12-02 18:09 ` Amit Shah
2024-12-02 18:25 ` Dave Hansen
2024-12-02 18:36 ` Sean Christopherson
2024-11-28 13:28 ` [RFC PATCH v3 2/2] x86: kvm: svm: advertise ERAPS (larger RSB) support to guests Amit Shah
2024-12-02 18:30 ` Sean Christopherson
2025-03-27 11:10 ` Shah, Amit
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=f43ebdd781d821d7fabdd85f1eebf8acd980566f.camel@amd.com \
--to=amit.shah@amd.com \
--cc=Babu.Moger@amd.com \
--cc=David.Kaplan@amd.com \
--cc=Sandipan.Das@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=amit@kernel.org \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--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
Powered by JetHome