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: <74cdaaf4-598d-29f8-584a-3c6a242adee1@kernel.org>
Date: Thu, 15 Jan 2026 21:50:20 -0700 (MST)
From: Paul Walmsley <pjw@...nel.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
cc: Paul Walmsley <pjw@...nel.org>, Palmer Dabbelt <palmer@...belt.com>, 
    Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>, 
    linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: Implement ARCH_HAS_CC_CAN_LINK

Hi,

On Mon, 22 Dec 2025, Thomas Weißschuh wrote:

> The generic CC_CAN_LINK detection relies on -m32/-m64 compiler flags.
> These are not supported by riscv compilers.
> 
> Use architecture-specific logic using -mabi instead.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
>  arch/riscv/Kconfig | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 6b39f37f769a..b4c1f922eed5 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -25,6 +25,7 @@ config RISCV
>  	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
>  	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
>  	select ARCH_HAS_BINFMT_FLAT
> +	select ARCH_HAS_CC_CAN_LINK
>  	select ARCH_HAS_CURRENT_STACK_POINTER
>  	select ARCH_HAS_DEBUG_VIRTUAL if MMU
>  	select ARCH_HAS_DEBUG_VM_PGTABLE
> @@ -1351,6 +1352,16 @@ config PORTABLE
>  config ARCH_PROC_KCORE_TEXT
>  	def_bool y
>  
> +config ARCH_CC_CAN_LINK
> +	bool
> +	default $(cc_can_link_user,-mabi=lp64d) if 64BIT
> +	default $(cc_can_link_user,-mabi=ilp32d)
> +
> +config ARCH_USERFLAGS
> +	string
> +	default "-mabi=lp64d" if 64BIT
> +	default "-mabi=ilp32d"
> +

Any reason why this patch shouldn't use the non-d ABI variants, as the 
rest of arch/riscv/Kconfig does?  I suspect this may not work for 
!CONFIG_FPU builds.


- Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ