[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181129143509.GF32259@char.us.oracle.com>
Date: Thu, 29 Nov 2018 09:35:09 -0500
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>,
Tom Lendacky <thomas.lendacky@....com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Casey Schaufler <casey.schaufler@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jon Masters <jcm@...hat.com>,
Waiman Long <longman9394@...il.com>,
Greg KH <gregkh@...uxfoundation.org>,
Dave Stewart <david.c.stewart@...el.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [patch V2 05/28] x86/speculation: Disable STIBP when enhanced
IBRS is in use
On Sun, Nov 25, 2018 at 07:33:33PM +0100, Thomas Gleixner wrote:
> If enhanced IBRS is active, STIBP is redundant for mitigating Spectre v2
> user space exploits from hyperthread sibling.
>
> Disable STIBP when enhanced IBRS is used.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Thank you!
>
> Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
>
> ---
> arch/x86/kernel/cpu/bugs.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -321,6 +321,10 @@ static bool stibp_needed(void)
> if (spectre_v2_enabled == SPECTRE_V2_NONE)
> return false;
>
> + /* Enhanced IBRS makes using STIBP unnecessary. */
> + if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED)
> + return false;
> +
> if (!boot_cpu_has(X86_FEATURE_STIBP))
> return false;
>
> @@ -846,6 +850,9 @@ static ssize_t l1tf_show_state(char *buf
>
> static char *stibp_state(void)
> {
> + if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED)
> + return "";
> +
> if (x86_spec_ctrl_base & SPEC_CTRL_STIBP)
> return ", STIBP";
> else
>
>
Powered by blists - more mailing lists