All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v3 06/10] [PATCH v3 6/9] Linux Patch #6
Date: Mon, 23 Apr 2018 21:08:49 +0200	[thread overview]
Message-ID: <20180423190849.GN24245@pd.tnic> (raw)
In-Reply-To: <20180423185755.GM24245@pd.tnic>

On Mon, Apr 23, 2018 at 08:57:55PM +0200, Borislav Petkov wrote:
> Something's still fishy with this patch. I'm booting a guest with
> 
> spec_store_bypass_disable=on
> 
> but dmesg still says:
> 
> [    0.044001] Speculative Store Bypass: Vulnerable

Ok, there it is:

static enum spec_store_bypass_mitigation_cmd __init spec_store_bypass_parse_cmdline(void)
{
        char arg[20];
        int ret, i;
        enum spec_store_bypass_mitigation_cmd cmd = SPEC_STORE_BYPASS_CMD_AUTO;

        if (!boot_cpu_has_bug(X86_BUG_CPU_SPEC_STORE_BYPASS)) {
                return SPEC_STORE_BYPASS_CMD_NONE;

It needs to be

	if (!boot_cpu_has_bug(X86_BUG_CPU_SPEC_STORE_BYPASS))

not

	if (!boot_cpu_has(X86_FEATURE_STBUF_BYPASS))

which we set earlier in cpu_set_bug_bits().

Which makes me wonder why we even need X86_FEATURE_STBUF_BYPASS?

Or why we need X86_BUG_CPU_SPEC_STORE_BYPASS?

One of the two is superfluous AFAICT.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

      reply	other threads:[~2018-04-23 19:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 17:11 [MODERATED] [PATCH v3 06/10] [PATCH v3 6/9] Linux Patch #6 konrad.wilk
2018-04-23 18:34 ` [MODERATED] " Borislav Petkov
2018-04-23 20:45   ` Jiri Kosina
2018-04-23 21:06     ` Borislav Petkov
2018-04-24  0:19   ` Konrad Rzeszutek Wilk
2018-04-23 18:57 ` Borislav Petkov
2018-04-23 19:08   ` Borislav Petkov [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=20180423190849.GN24245@pd.tnic \
    --to=bp@suse.de \
    --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.