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: <c75a2de763dc8ea42a734490936f198a6ad07349.camel@xry111.site>
Date: Sun, 08 Sep 2024 22:42:45 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>, Josh Poimboeuf
 <jpoimboe@...nel.org>,  Peter Zijlstra <peterz@...radead.org>, Huacai Chen
 <chenhuacai@...nel.org>
Cc: loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/4] LoongArch: Set AS_HAS_THIN_ADD_SUB as y if
 AS_IS_LLVM

On Wed, 2024-08-07 at 16:59 +0800, Tiezhu Yang wrote:
> When building kernel with "make CC=clang defconfig", LLVM Assembler
> is used due to LLVM_IAS=0 is not specified, then AS_HAS_THIN_ADD_SUB
> is not set, thus objtool can not be built after enable it for Clang.
> 
> config AS_HAS_THIN_ADD_SUB is to check whether -mthin-add-sub option is
> available to know R_LARCH_{32,64}_PCREL are supported for GNU Assembler,
> there is no this option for LLVM Assembler. The minimal version of Clang
> is 18 for building LoongArch kernel, and Clang >= 17 already supports
> R_LARCH_{32,64}_PCREL, that is to say, there is no need to depend on
> AS_HAS_THIN_ADD_SUB for Clang, so just set AS_HAS_THIN_ADD_SUB as y if
> AS_IS_LLVM.
> 
> Fixes: 120dd4118e58 ("LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub")
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>

This is what I wanted in
https://lore.kernel.org/all/20240604150741.30252-1-xry111@xry111.site/.

Reviewed-by: Xi Ruoyao <xry111@...111.site>

> ---
>  arch/loongarch/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index 70f169210b52..e1b6cb306d4d 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -265,7 +265,7 @@ config AS_HAS_FCSR_CLASS
>  	def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0)
>  
>  config AS_HAS_THIN_ADD_SUB
> -	def_bool $(cc-option,-Wa$(comma)-mthin-add-sub)
> +	def_bool $(cc-option,-Wa$(comma)-mthin-add-sub) || AS_IS_LLVM
>  
>  config AS_HAS_LSX_EXTENSION
>  	def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0)

-- 
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ