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: <2083af75-e2d8-42b9-8fa6-f5b7496671bd@app.fastmail.com>
Date: Wed, 07 Aug 2024 17:41:50 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Harith George" <mail2hgg@...il.com>,
 "Yuntao Liu" <liuyuntao12@...wei.com>,
 "Linus Walleij" <linus.walleij@...aro.org>,
 "Russell King" <rmk+kernel@...linux.org.uk>,
 "Ard Biesheuvel" <ardb@...nel.org>, harith.g@...fsemi.com
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [build fail] v6.11-rc2 from "ARM: 9404/1: arm32: enable
 HAVE_LD_DEAD_CODE_DATA_ELIMINATION"

On Wed, Aug 7, 2024, at 17:36, Harith George wrote:
> On 07-08-2024 20:52, liuyuntao (F) wrote:
>> Thanks, I reproduce the link error with toolchain
>> gcc version 9.3.0
>> GNU ld (GNU Binutils) 2.33.1
>> 
>> with same gcc version, just upgrading ld version to 2.36.1, it does not 
>> segfault and build completes. there should be bugs in low version of ld,
>> and the ".relocĀ  .text, R_ARM_NONE, ." triggers that.
>> 
> Thanks for confirming.
>
> I guess we need to add something like
> #if !CONFIG_CC_IS_GCC || CONFIG_LD_VERSION >= 23600
> around the entry-armv.S changes and maybe select 
> HAVE_LD_DEAD_CODE_DATA_ELIMINATION in arch/arm/Kconfig only if the same 
> conditions are met ??

I think it makes most sense to have a minimum LD
version as a dependency for HAVE_LD_DEAD_CODE_DATA_ELIMINATION.
Are you sure that 2.36 is the first one that works, and it's
not just 2.33 specifically that is broken?

If so, we could use

--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -117,7 +117,7 @@ config ARM
        select HAVE_KERNEL_XZ
        select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M && !CPU_32v3
        select HAVE_KRETPROBES if HAVE_KPROBES
-       select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
+       select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if (LD_VERSION >= 23600 || LD_IS_LLD)
        select HAVE_MOD_ARCH_SPECIFIC
        select HAVE_NMI
        select HAVE_OPTPROBES if !THUMB2_KERNEL


binutils only takes a few seconds to build from source, so
you could just try all version from 2.25 (the oldest supported)
to 2.36) to see which ones work.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ