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: <20250516074806.GAaCbttptX_H2Gn8OZ@fat_crate.local>
Date: Fri, 16 May 2025 09:48:06 +0200
From: Borislav Petkov <bp@...en8.de>
To: Suraj Jitindar Singh <surajjs@...zon.com>,
	David Kaplan <David.Kaplan@....com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>, stable@...r.kernel.org
Subject: Re: [PATCH 2/2] x86/bugs: Don't WARN() when overwriting
 retbleed_return_thunk with srso_return_thunk

On Thu, May 15, 2025 at 04:34:33PM -0700, Suraj Jitindar Singh wrote:
> -	WARN(x86_return_thunk != __x86_return_thunk,
> +	WARN((x86_return_thunk != __x86_return_thunk) &&
> +	     (thunk != srso_return_thunk ||
> +	      x86_return_thunk != retbleed_return_thunk),
>  	     "x86/bugs: return thunk changed from %ps to %ps\n",
>  	     x86_return_thunk, thunk);

This is still adding that nasty conditional which I'd like to avoid.

And I just had this other idea: we're switching to select/update/apply logic
with the mitigations and I'm sure we can use that new ability to select the
proper mitigation when other mitigations are influencing the decision, to
select the proper return thunk.

I'm thinking for retbleed and SRSO we could set it only once, perhaps in
srso_select_mitigation() as it runs last.

I don't want to introduce an amd_return_thunk... :-)

But David might have a better idea...

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ