lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240413042135.z2vglouqfl763m77@treble>
Date: Fri, 12 Apr 2024 21:21:35 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
	Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Alexandre Chartre <alexandre.chartre@...cle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Sean Christopherson <seanjc@...gle.com>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Nikolay Borisov <nik.borisov@...e.com>,
	KP Singh <kpsingh@...nel.org>, Waiman Long <longman@...hat.com>,
	Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 3/3] x86/bugs: Remove support for Spectre v2 LFENCE
 "retpolines"

On Fri, Apr 12, 2024 at 11:10:34AM -0700, Josh Poimboeuf wrote:
> I found several bugs where code assumes that X86_FEATURE_RETPOLINE
> actually means retpolines (imagine that!).  In fact that feature also
> includes the original AMD LFENCE "retpolines", which aren't in fact
> retpolines.
> 
> Really, those "retpolines" should just be removed.  They're already
> considered vulnerable due to the fact that the speculative window after
> the indirect branch can still be long enough to do multiple dependent
> loads.  And recent tooling makes such gadgets easier to find.
> 
> Also, EIBRS_LFENCE tests worse in real-world benchmarks than the actual
> BHI mitigations, so it's both slower and less secure.
> 
> Specifically this removes support for the following cmdline options:
> 
>   - spectre_v2=retpoline,amd
>   - spectre_v2=retpoline,lfence
>   - spectre_v2=eibrs,lfence
> 
> Now when any of those options are used, it will print an error and fall
> back to the defaults (spectre_v2=auto spectre_bhi=on).
> 
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>

Compile fix:

diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/asm/disabled-features.h
index e1c421282a78..3a1349c0f225 100644
--- a/arch/x86/include/asm/disabled-features.h
+++ b/arch/x86/include/asm/disabled-features.h
@@ -53,7 +53,7 @@
 #ifdef CONFIG_MITIGATION_RETPOLINE
 # define DISABLE_RETPOLINE	0
 #else
-# define DISABLE_RETPOLINE	(1 << (X86_FEATURE_RETPOLINE & 31)
+# define DISABLE_RETPOLINE	(1 << (X86_FEATURE_RETPOLINE & 31))
 #endif
 
 #ifdef CONFIG_MITIGATION_RETHUNK

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ