[MODERATED] Re: [PATCH RFC 3/4] 3
Josh Poimboeuf <[email protected]>
| Newsgroups | org.kernel.lore.historical-speck |
|---|---|
| Message-ID | <20190304171854.6snogslbgvsurixi@treble> |
On Mon, Mar 04, 2019 at 08:33:09AM +0100, speck for Greg KH wrote: > On Sun, Mar 03, 2019 at 07:24:55PM -0600, speck for Josh Poimboeuf wrote: > > From: Josh Poimboeuf <[email protected]> > > Subject: [PATCH RFC 3/4] x86/speculation/mds: Add SMT warning message > > > > MDS is vulnerable with SMT. Make that clear with a one-time printk > > whenever SMT first gets enabled. > > > > Signed-off-by: Josh Poimboeuf <[email protected]> > > --- > > arch/x86/kernel/cpu/bugs.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c > > index 9e20aef01d38..346f0f05879d 100644 > > --- a/arch/x86/kernel/cpu/bugs.c > > +++ b/arch/x86/kernel/cpu/bugs.c > > @@ -691,6 +691,8 @@ static void update_mds_branch_idle(void) > > static_branch_disable(&mds_idle_clear); > > } > > > > +#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" > > Why a #define? Just stick that string into the printk message. The message is so long that it will really break up the flow and readability of the code IMO. We did the same thing in the vmx code for the same reasons -- see L1TF_MSG_SMT and L1TF_MSG_L1D. -- Josh