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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 23 Jan 2024 16:06:37 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Breno Leitao <leitao@...ian.org>
Cc: mingo@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Josh Poimboeuf <jpoimboe@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86/bugs: Add a separate config for missing
 mitigation

On Tue, Jan 23, 2024 at 07:05:47AM -0800, Breno Leitao wrote:
> On Mon, Jan 22, 2024 at 12:58:21PM -0800, Pawan Gupta wrote:
> > On Thu, Jan 18, 2024 at 09:32:12AM -0800, Breno Leitao wrote:
> > > +config MITIGATION_RETBLEED
> > > +	bool "Mitigate RETBleed hardware bug"
> > > +	depends on CPU_SUP_INTEL || (CPU_SUP_AMD && MITIGATION_UNRET_ENTRY)
> > 
> > Atleast on Intel CPUs, Retbleed mitigation is meaningless without
> > spectre-v2 being mitigated, shouldn't this depend on MITIGATION_SPECTRE_V2?
> 
> I suppose it is the same for AMD, right?

AMD's retbleed problem and mitigation is a bit different, it has to do
with Branch Type Confusion(BTC). I am not sure if it is possible to
mitigate it without spectre-v2 mitigation. Someone from AMD should be
able to clarify. Looking at the code it appears the dependency is on
CONFIG_CPU_UNRET_ENTRY or CONFIG_CPU_IBPB_ENTRY being set:

retbleed_select_mitigation()
{
..
         case RETBLEED_CMD_AUTO:
                 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
                     boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) {
                         if (IS_ENABLED(CONFIG_CPU_UNRET_ENTRY))
                                 retbleed_mitigation = RETBLEED_MITIGATION_UNRET;
                         else if (IS_ENABLED(CONFIG_CPU_IBPB_ENTRY) && boot_cpu_has(X86_FEATURE_IBPB))
                                 retbleed_mitigation = RETBLEED_MITIGATION_IBPB;
                 }

> So, I suppose it should be something as:
> 
> 	depends on (MITIGATION_SPECTRE_V2 && (CPU_SUP_INTEL || (CPU_SUP_AMD && MITIGATION_UNRET_ENTRY))
> 
> Is this better?
> 
> Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ