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: <20250414162453-469e4a0c-d2f4-48a9-bd0f-c0a1d64d9dc2@linutronix.de>
Date: Mon, 14 Apr 2025 16:29:37 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Aleksandr Nogikh <nogikh@...gle.com>
Cc: llvm@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>, 
	syzkaller <syzkaller@...glegroups.com>, Dmitry Vyukov <dvyukov@...gle.com>, 
	Alexander Potapenko <glider@...gle.com>
Subject: Re: Latest clang versions fail to compile CONFIG_X86_X32_ABI=y

Hi,

On Mon, Apr 14, 2025 at 04:11:15PM +0200, Aleksandr Nogikh wrote:
> I've been trying to build a Linux kernel using newer llvm toolchain
> versions (18, 19, 20), but it consistently fails with the following
> errors:
> 
> ld.lld: error: arch/x86/entry/vdso/vgetrandom-x32.o:(.note.gnu.property+0x0):
> data is too short
> ld.lld: error: arch/x86/entry/vdso/vgetcpu-x32.o:(.note.gnu.property+0x0):
> data is too short
> ld.lld: error: arch/x86/entry/vdso/vclock_gettime-x32.o:(.note.gnu.property+0x0):
> data is too short
> 
> The steps to reproduce:
> $ git checkout v6.15-rc2
> $ make defconfig
> $ ./scripts/config -e X86_X32_ABI
> $ make CC=clang LD=ld.lld -j48
> 
> The versions used:
> $ clang --version
> Debian clang version 20.1.2
> (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97)
> $ ld.lld --version
> Debian LLD 20.1.2 (compatible with GNU linkers)
> 
> Is this a known clang/Linux issue?
> 
> There's a kernel commit that addresses a similar problem:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aaeed6ecc1253ce1463fa1aca0b70a4ccbc9fa75
> 
> but the error is slightly different there and the added Kconfig
> condition apparently did not kick in.

The Kconfig condition does not kick in because this make invocation uses the
regular objcopy and not llvm-objcopy.
To use all parts of the LLVM toolchain use "make LLVM=1".
(Barring existings bugs where linking is done through $CC/clang which may use the
default system linker, instead of ld.lld)


Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ