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: <621a5bd9-ec51-46eb-8d8e-c463085f92e2@gmail.com>
Date: Sat, 1 Feb 2025 01:03:32 +0100
From: Christian Schrefl <chrisi.schrefl@...il.com>
To: Andrew Lunn <andrew@...n.ch>, Miguel Ojeda <ojeda@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Alex Gaynor <alex.gaynor@...il.com>,
 Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
 Björn Roy Baron <bjorn3_gh@...tonmail.com>,
 Benno Lossin <benno.lossin@...ton.me>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>, Jonathan Corbet <corbet@....net>,
 Russell King <linux@...linux.org.uk>, Rudraksha Gupta <guptarud@...il.com>,
 Ard Biesheuvel <ardb@...nel.org>, Geert Stappers <stappers@...ppers.nl>,
 Jamie Cunliffe <Jamie.Cunliffe@....com>,
 Sven Van Asbroeck <thesven73@...il.com>, rust-for-linux@...r.kernel.org,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3] arm: rust: Enable Rust support for ARMv7

On 31.01.25 7:58 PM, Christian Schrefl wrote:
> On 31.01.25 5:05 PM, Andrew Lunn wrote:
>>> To fix this Rust would have to provide a way to build the core
>>> library without float support. I don't know if there is a plan
>>> already to allow this.
>>
>> Floating point is banned within the kernel, except for in very narrow
>> conditions, because the floating point registers are lazy saved on
>> context switch. If the kernel uses the floating point registers, you
>> can break user space in bad ways.
>>
>> I expect this has been discussed, since it is well known kernel
>> restriction. Maybe go see what happened to that discussion within RfL?
> 
> After checking again, it seems the float intrinsics are actually not
> needed anymore at least for my config. Only `__aeabi_uldivmod` is still
> required for `parse_u64_into` since [0] allows disabling float formatting.

Seems like Rust 1.78 still needs at least __aeabi_fcmpeq __aeabi_fcmpun
__aeabi_dcmpun and __aeabi_uldivmod.

> 
> Link error without the `__aeabi_uldivmod` symbol defined:
> 
> ld.lld: error: undefined symbol: __aeabi_uldivmod
>>>> referenced by num.rs:580 (/home/chrisi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/num.rs:580)
>>>>               rust/core.o:(core::fmt::num::parse_u64_into::<39>) in archive vmlinux.a
>>>> referenced by num.rs:589 (/home/chrisi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/num.rs:589)
>>>>               rust/core.o:(core::fmt::num::parse_u64_into::<39>) in archive vmlinux.a
>>>> referenced by num.rs:589 (/home/chrisi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/num.rs:589)
>>>>               rust/core.o:(core::fmt::num::parse_u64_into::<39>) in archive vmlinux.a
>>>> referenced 34 more times
>>>> did you mean: __aeabi_uidivmod
>>>> defined in: vmlinux.a(arch/arm/lib/lib1funcs.o)
> 
> Not sure if we should just implement `__aeabi_uldivmod`, keep the 
> panicking intrinsic for it or somehow fix it in upstream Rust?
> 
> Miguel do you know how this is best handled?
> 
> Link: https://github.com/rust-lang/rust/pull/86048 [0]
> 
> Cheers
> Christian


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ