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: <202502191021.2BB61F8684@keescook>
Date: Wed, 19 Feb 2025 10:21:36 -0800
From: Kees Cook <kees@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, alyssa.milburn@...el.com,
	scott.d.constable@...el.com, joao@...rdrivepizza.com,
	andrew.cooper3@...rix.com, jpoimboe@...nel.org,
	jose.marchesi@...cle.com, hjl.tools@...il.com,
	ndesaulniers@...gle.com, samitolvanen@...gle.com, nathan@...nel.org,
	ojeda@...nel.org, alexei.starovoitov@...il.com, mhiramat@...nel.org,
	jmill@....edu
Subject: Re: [PATCH v3 10/10] x86/ibt: Optimize fineibt-bhi arity 1 case

On Wed, Feb 19, 2025 at 05:21:17PM +0100, Peter Zijlstra wrote:
> Saves a CALL to an out-of-line thunk for the common case of 1
> argument.
> 
> Suggested-by: Scott Constable <scott.d.constable@...el.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  arch/x86/include/asm/ibt.h    |    4 ++
>  arch/x86/kernel/alternative.c |   61 +++++++++++++++++++++++++++++++++++-------
>  2 files changed, 56 insertions(+), 9 deletions(-)
> 
> --- a/arch/x86/include/asm/ibt.h
> +++ b/arch/x86/include/asm/ibt.h
> @@ -70,6 +70,10 @@ static inline bool __is_endbr(u32 val)
>  	if (val == gen_endbr_poison())
>  		return true;
>  
> +	/* See cfi_fineibt_bhi_preamble() */
> +	if (IS_ENABLED(CONFIG_FINEIBT_BHI) && val == 0x001f0ff5)
> +		return true;

Does this magic value need some better documentation?

Reviewed-by: Kees Cook <kees@...nel.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ