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] [day] [month] [year] [list]
Message-ID: <Z8GDqxTNN0rLBbrX@gmail.com>
Date: Fri, 28 Feb 2025 10:36:43 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
Cc: x86@...nel.org, Josh Poimboeuf <jpoimboe@...nel.org>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] x86/speculation: Simplify and make CALL_NOSPEC
 consistent


* Pawan Gupta <pawan.kumar.gupta@...ux.intel.com> wrote:

> CALL_NOSPEC macro is used to generate Spectre-v2 mitigation friendly
> indirect branches. At compile time the macro defaults to indirect branch,
> and at runtime those can be patched to thunk based mitigations.
>
> This approach is opposite of what is done for the rest of the kernel, where
> the compile time default is to replace indirect calls with retpoline thunk
> calls.
> 
> Make CALL_NOSPEC consistent with the rest of the kernel, default to
> retpoline thunk at compile time when CONFIG_MITIGATION_RETPOLINE is
> enabled.
> 
> Also add the missing __CS_PREFIX to the CALL_NOSPEC macro to make it
> compatible with -mindirect-branch-cs-prefix.

The __CS_PREFIX change should probably be a separate patch.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ