mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Cc: linux-kernel@vger.kernel.org, Mark Gross <mgross@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	John Johansen <john.johansen@canonical.com>,
	Steve Beattie <sbeattie@ubuntu.com>
Subject: Re: [PATCH] x86/speculation/srbds: do not try to turn mitigation off when not supported
Date: Mon, 15 Jun 2020 10:28:58 +0200	[thread overview]
Message-ID: <20200615082858.GC14668@zn.tnic> (raw)
In-Reply-To: <20200609174313.2600320-1-cascardo@canonical.com>

On Tue, Jun 09, 2020 at 02:43:13PM -0300, Thadeu Lima de Souza Cascardo wrote:
> When SRBDS is mitigated by TSX OFF, update_srbds_msr will still read and

Are you talking about this case in srbds_select_mitigation():

        if ((ia32_cap & ARCH_CAP_MDS_NO) && !boot_cpu_has(X86_FEATURE_RTM))
                srbds_mitigation = SRBDS_MITIGATION_TSX_OFF;

?

and you have a system which:

         * Check to see if this is one of the MDS_NO systems supporting
         * TSX that are only exposed to SRBDS when TSX is enabled.

i.e., no SRBDS microcode for it and the fix is to disable TSX?

If so, I think the right fix should be to do:

	if (!boot_cpu_has(X86_FEATURE_SRBDS_CTRL))
		return;

in update_srbds_msr() with a comment above it explaining why that check
is being done.

Hmmm.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2020-06-15  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 17:43 Thadeu Lima de Souza Cascardo
2020-06-15  8:28 ` Borislav Petkov [this message]
2020-06-15 10:27   ` Thadeu Lima de Souza Cascardo
2020-06-15 10:47     ` Borislav Petkov

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=20200615082858.GC14668@zn.tnic \
    --to=bp@alien8.de \
    --cc=cascardo@canonical.com \
    --cc=hpa@zytor.com \
    --cc=john.johansen@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=sbeattie@ubuntu.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

all inboxes | Powered by JetHome®