Commit aca2ddbc authored by Tim Chen's avatar Tim Chen Committed by Greg Kroah-Hartman
Browse files

x86/speculation: Disable STIBP when enhanced IBRS is in use

commit 34bce7c9


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: default avatarTim Chen <>
Signed-off-by: default avatarThomas Gleixner <>
Reviewed-by: default avatarIngo Molnar <>
Cc: Peter Zijlstra <>
Cc: Andy Lutomirski <>
Cc: Linus Torvalds <>
Cc: Jiri Kosina <>
Cc: Tom Lendacky <>
Cc: Josh Poimboeuf <>
Cc: Andrea Arcangeli <>
Cc: David Woodhouse <>
Cc: Andi Kleen <>
Cc: Dave Hansen <>
Cc: Casey Schaufler <>
Cc: Asit Mallick <>
Cc: Arjan van de Ven <>
Cc: Jon Masters <>
Cc: Waiman Long <>
Cc: Greg KH <>
Cc: Dave Stewart <>
Cc: Kees Cook <>

Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 8588c7d4
......@@ -319,6 +319,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;
......@@ -843,6 +847,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";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment