Re: Re: [PATCH v2 0/3] Inline helpers into Rust without full LTO
From: Alice Ryhl <aliceryhl@google.com>
Date: 2026-03-26 10:10:13
Also in:
linux-kbuild, linux-mm, linux-um, lkml, llvm, rust-for-linux
On Mon, Mar 23, 2026 at 10:03:26AM +0000, Russell King (Oracle) wrote:
On Mon, Mar 23, 2026 at 01:03:27AM +0100, Miguel Ojeda wrote:quoted
On Sun, 22 Mar 2026 20:21:59 +0100 Miguel Ojeda [off-list ref] wrote:quoted
On the other hand, regardless of whether we fix this (and another issue in a separate email found thanks to the UML build), we could instead add `depends on` listing explicitly the architectures where this is going to be actually tested. That way maintainers can decide whether they want to support it when they are ready. Thoughts?Another one for arm 32-bit: LD .tmp_vmlinux1 ld.lld: error: undefined symbol: __aeabi_read_tp >>> referenced by uaccess.rs:349 (rust/kernel/uaccess.rs:349) >>> samples/rust/rust_misc_device.o:(<rust_misc_device::RustMiscDevice as kernel::miscdevice::MiscDevice>::ioctl) in archive vmlinux.a >>> referenced by uaccess.rs:543 (rust/kernel/uaccess.rs:543) >>> samples/rust/rust_misc_device.o:(<rust_misc_device::RustMiscDevice as kernel::miscdevice::MiscDevice>::ioctl) in archive vmlinux.a >>> referenced by uaccess.rs:543 (rust/kernel/uaccess.rs:543) >>> drivers/android/binder/rust_binder_main.o:(rust_binder_main::rust_binder_ioctl) in archive vmlinux.a >>> referenced 36 more timesWhy is Rust generating code for userspace thread accessors for kernel space, where userspace threads are meaningless. This is totally wrong. The kernel must not reference __aeabi_read_tp(). Note: I know nothing about Rust, but I know enough to say the above is pointing to a fundamental issue in Rust for 32-bit ARM.
I noticed that the Makefile currently uses the arm-unknown-linux-gnueabi target. It should probably not be -linux target to avoid this? Probably it should just be armv7a-none-eabi, right? We gate HAVE_RUST on CPU_32v7, so we should not need to consider the other variants. Alice