[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-34bce7c9690b1d897686aac89604ba7adc365556@git.kernel.org>
Date: Wed, 28 Nov 2018 06:22:36 -0800
From: tip-bot for Tim Chen <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org,
thomas.lendacky@....com, aarcange@...hat.com, hpa@...or.com,
asit.k.mallick@...el.com, tglx@...utronix.de,
casey.schaufler@...el.com, dwmw@...zon.co.uk,
longman9394@...il.com, jcm@...hat.com, arjan@...ux.intel.com,
jkosina@...e.cz, gregkh@...uxfoundation.org,
tim.c.chen@...ux.intel.com, dave.hansen@...el.com,
jpoimboe@...hat.com, luto@...nel.org, peterz@...radead.org,
ak@...ux.intel.com, david.c.stewart@...el.com,
torvalds@...ux-foundation.org, keescook@...omium.org
Subject: [tip:x86/pti] x86/speculation: Disable STIBP when enhanced IBRS is
in use
Commit-ID: 34bce7c9690b1d897686aac89604ba7adc365556
Gitweb: https://git.kernel.org/tip/34bce7c9690b1d897686aac89604ba7adc365556
Author: Tim Chen <tim.c.chen@...ux.intel.com>
AuthorDate: Sun, 25 Nov 2018 19:33:33 +0100
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 28 Nov 2018 11:57:05 +0100
x86/speculation: Disable STIBP when enhanced IBRS is in use
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.
Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Ingo Molnar <mingo@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jiri Kosina <jkosina@...e.cz>
Cc: Tom Lendacky <thomas.lendacky@....com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andrea Arcangeli <aarcange@...hat.com>
Cc: David Woodhouse <dwmw@...zon.co.uk>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Casey Schaufler <casey.schaufler@...el.com>
Cc: Asit Mallick <asit.k.mallick@...el.com>
Cc: Arjan van de Ven <arjan@...ux.intel.com>
Cc: Jon Masters <jcm@...hat.com>
Cc: Waiman Long <longman9394@...il.com>
Cc: Greg KH <gregkh@...uxfoundation.org>
Cc: Dave Stewart <david.c.stewart@...el.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20181125185003.966801480@linutronix.de
---
arch/x86/kernel/cpu/bugs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index a1502bce9eb8..924cd06dd43b 100644
--- 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