All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH RFC 3/4] 3
Date: Mon, 4 Mar 2019 11:18:54 -0600	[thread overview]
Message-ID: <20190304171854.6snogslbgvsurixi@treble> (raw)
In-Reply-To: <20190304073309.GC23573@kroah.com>

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 <jpoimboe@redhat.com>
> > 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 <jpoimboe@redhat.com>
> > ---
> >  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

  reply	other threads:[~2019-03-05 14:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04  1:21 [MODERATED] [PATCH RFC 0/4] Proposed cmdline improvements Josh Poimboeuf
2019-03-04  1:23 ` [MODERATED] [PATCH RFC 1/4] 1 Josh Poimboeuf
2019-03-04  3:55   ` [MODERATED] Encrypted Message Jon Masters
2019-03-04 17:06     ` [MODERATED] " Josh Poimboeuf
2019-03-04  7:30   ` [MODERATED] Re: [PATCH RFC 1/4] 1 Greg KH
2019-03-04  7:45     ` [MODERATED] Encrypted Message Jon Masters
2019-03-04  1:24 ` [MODERATED] [PATCH RFC 2/4] 2 Josh Poimboeuf
2019-03-04  7:31   ` [MODERATED] " Greg KH
2019-03-04 17:11     ` Josh Poimboeuf
2019-03-04  1:24 ` [MODERATED] [PATCH RFC 3/4] 3 Josh Poimboeuf
2019-03-04  3:58   ` [MODERATED] Encrypted Message Jon Masters
2019-03-04 17:17     ` [MODERATED] " Josh Poimboeuf
2019-03-06 16:22       ` [MODERATED] " Jon Masters
2019-03-04  7:33   ` [MODERATED] Re: [PATCH RFC 3/4] 3 Greg KH
2019-03-04 17:18     ` Josh Poimboeuf [this message]
2019-03-04  1:25 ` [MODERATED] [PATCH RFC 4/4] 4 Josh Poimboeuf
2019-03-04  4:07   ` [MODERATED] Encrypted Message Jon Masters

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=20190304171854.6snogslbgvsurixi@treble \
    --to=jpoimboe@redhat.com \
    --cc=speck@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.