Historical speck list archives
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v6] boot-time control
Date: Sun, 8 Jul 2018 15:13:38 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.1807081508590.997@cbobk.fhfr.pm> (raw)
In-Reply-To: <alpine.DEB.2.21.1807081437090.1589@nanos.tec.linutronix.de>

On Sun, 8 Jul 2018, speck for Thomas Gleixner wrote:

> > +static const char *l1tf_states[] = {
> > +	[L1TF_MITIGATION_FULL]		= "Mitigation: Full",
> > +	[L1TF_MITIGATION_FULL_FORCE]	= "Mitigation: Full [force]",
> > +	[L1TF_MITIGATION_NOVIRT]	= "Mitigation: Page Table Inversion [novirt]",
> > +	[L1TF_MITIGATION_NOVIRT_NOWARN]	= "Mitigation: Page Table Inversion [novirt,nowarn]"
> > +};
> > +
> >  static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr,
> >  			       char *buf, unsigned int bug)
> >  {
> > @@ -712,9 +763,7 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
> >  		return sprintf(buf, "%s\n", ssb_strings[ssb_mode]);
> >  
> >  	case X86_BUG_L1TF:
> > -		if (boot_cpu_has(X86_FEATURE_L1TF_PTEINV))
> > -			return sprintf(buf, "Mitigation: Page Table Inversion\n");
> > -		break;
> > +		return sprintf(buf, "%s\n", l1tf_states[get_l1tf_mitigation()]);
> 
> Hmm. This is not telling the actual VMX protection state, which might be
> different than what the command line paraameter or default selected.

So we can either display only the current state of affairs, such as

	Mitigation: Page Table Inversion, VMX L1D=[confined,always,off], SMT=[on,off]

or somehow try to display both what has been selected on cmdline, and what 
is the current state.

If noone has objections, I think I'll just go with displaying the current 
state (as above), ignoring the cmdline parameter altogether.

I'll wait a bit if there is any more feedback apart from your and Josh's 
and send v7 probably tomorrow.

Thanks,

-- 
Jiri Kosina
SUSE Labs

      reply	other threads:[~2018-07-08 13:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 18:47 [MODERATED] [PATCH v6] boot-time control Jiri Kosina
2018-07-06 19:10 ` [MODERATED] " Andi Kleen
2018-07-06 19:23   ` Jiri Kosina
2018-07-06 19:39     ` Thomas Gleixner
2018-07-06 20:06     ` [MODERATED] " Luck, Tony
2018-07-06 20:19       ` Jiri Kosina
2018-07-06 20:31         ` Josh Poimboeuf
2018-07-06 20:01 ` Josh Poimboeuf
2018-07-08 12:42 ` Thomas Gleixner
2018-07-08 13:13   ` Jiri Kosina [this message]

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=nycvar.YFH.7.76.1807081508590.997@cbobk.fhfr.pm \
    --to=jkosina@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).