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: <20250226195308.GA29387@noisy.programming.kicks-ass.net>
Date: Wed, 26 Feb 2025 20:53:08 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: linux-kernel@...r.kernel.org, ojeda@...nel.org
Cc: linux-tip-commits@...r.kernel.org,
	Scott Constable <scott.d.constable@...el.com>,
	Ingo Molnar <mingo@...nel.org>, Kees Cook <kees@...nel.org>,
	x86@...nel.org
Subject: Re: [tip: x86/core] x86/ibt: Implement FineIBT-BHI mitigation

On Wed, Feb 26, 2025 at 12:54:35PM -0000, tip-bot2 for Peter Zijlstra wrote:

> diff --git a/Makefile b/Makefile
> index 96407c1..f19431f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1014,6 +1014,9 @@ CC_FLAGS_CFI	:= -fsanitize=kcfi
>  ifdef CONFIG_CFI_ICALL_NORMALIZE_INTEGERS
>  	CC_FLAGS_CFI	+= -fsanitize-cfi-icall-experimental-normalize-integers
>  endif
> +ifdef CONFIG_FINEIBT_BHI
> +	CC_FLAGS_CFI	+= -fsanitize-kcfi-arity
> +endif
>  ifdef CONFIG_RUST
>  	# Always pass -Zsanitizer-cfi-normalize-integers as CONFIG_RUST selects
>  	# CONFIG_CFI_ICALL_NORMALIZE_INTEGERS.
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index c4175f4..5c27726 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2473,6 +2473,10 @@ config CC_HAS_RETURN_THUNK
>  config CC_HAS_ENTRY_PADDING
>  	def_bool $(cc-option,-fpatchable-function-entry=16,16)
>  
> +config CC_HAS_KCFI_ARITY
> +	def_bool $(cc-option,-fsanitize=kcfi -fsanitize-kcfi-arity)
> +	depends on CC_IS_CLANG && !RUST
> +

Miguel, can we work on fixing that !RUST dep?

>  config FUNCTION_PADDING_CFI
>  	int
>  	default 59 if FUNCTION_ALIGNMENT_64B
> @@ -2498,6 +2502,10 @@ config FINEIBT
>  	depends on X86_KERNEL_IBT && CFI_CLANG && MITIGATION_RETPOLINE
>  	select CALL_PADDING
>  
> +config FINEIBT_BHI
> +	def_bool y
> +	depends on FINEIBT && CC_HAS_KCFI_ARITY
> +
>  config HAVE_CALL_THUNKS
>  	def_bool y
>  	depends on CC_HAS_ENTRY_PADDING && MITIGATION_RETHUNK && OBJTOOL

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ