All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH] taa fix
Date: Thu, 7 Nov 2019 10:25:33 +0100	[thread overview]
Message-ID: <20191107092533.GA4243@zn.tnic> (raw)
In-Reply-To: <20191107022646.6h724wh4im5zxvw2@treble>

On Wed, Nov 06, 2019 at 08:26:46PM -0600, speck for Josh Poimboeuf wrote:
> From: Josh Poimboeuf <jpoimboe@redhat.com>
> Subject: [PATCH] x86/speculation/taa: Fix TAA_MSG_SMT printk

Subject should be something like "Print TAA_MSG_SMT on IBRS_ALL CPUs
too" or so.

> For new IBRS_ALL CPUs, the Enhanced IBRS check at the beginning of
> cpu_bugs_smt_update() causes the function to return early,
> unintentionally skipping the MDS and TAA logic.
> 
> I don't think it's a problem for MDS, because AFAICT there appears to be
> no overlap between IBRS_ALL and MDS-affected CPUs.  So the MDS
> mitigation would be disabled and nothing would need to be done in this
> function anyway.
> 
> But for TAA, the TAA_MSG_SMT string will never get printed on Cascade
> Lake and newer.
> 
> The check is superfluous anyway: when 'spectre_v2_enabled' is
> SPECTRE_V2_IBRS_ENHANCED, 'spectre_v2_user' is always
> SPECTRE_V2_USER_NONE, and so the 'spectre_v2_user' switch statement
> handles it appropriately by doing nothing.  So just remove the check.
> 
> Fixes: 1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort")
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
>  arch/x86/kernel/cpu/bugs.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index 850005590167..4c7b0fa15a19 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -886,10 +886,6 @@ static void update_mds_branch_idle(void)
>  
>  void cpu_bugs_smt_update(void)
>  {
> -	/* Enhanced IBRS implies STIBP. No update required. */
> -	if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED)
> -		return;
> -
>  	mutex_lock(&spec_ctrl_mutex);
>  
>  	switch (spectre_v2_user) {
> -- 

With that addressed:

Reviewed-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
-- 

  parent reply	other threads:[~2019-11-07  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  2:26 [MODERATED] [PATCH] taa fix Josh Poimboeuf
2019-11-07  2:41 ` [MODERATED] " Tyler Hicks
2019-11-07  9:25 ` Borislav Petkov [this message]
2019-11-07 13:47   ` Josh Poimboeuf
2019-11-07 13:49     ` Borislav Petkov
2019-11-07 14:59       ` Josh Poimboeuf
2019-11-07 15:04         ` Thomas Gleixner

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=20191107092533.GA4243@zn.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.