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: <CANiq72n7UhQEh9TJU7UNBv2t0ZR_rNO3dqbVZ2cwr99u5SOVeg@mail.gmail.com>
Date: Wed, 5 Feb 2025 14:12:35 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Christian Schrefl <chrisi.schrefl@...il.com>, Arnd Bergmann <arnd@...db.de>, 
	Miguel Ojeda <ojeda@...nel.org>, 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, 
	Catalin Marinas <catalin.marinas@....com>
Subject: Re: [PATCH v3] arm: rust: Enable Rust support for ARMv7

On Fri, Jan 31, 2025 at 5:05 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> 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?

Yeah, it has been discussed, including in the last couple weeks in the
Rust Zulip due to the upcoming move to the aarch64 `softfloat` target
(the disallowing of disabling `neon` in the hardfloat one).

Ideally, I think upstream Rust could perhaps give us a way to do
something like `-mgeneral-regs-only` or `-march=...+nofp` (in the form
GCC does it, i.e. a hard error if one even tries to use the floating
point types even within a function implementation, not just in
interfaces like in Clang), i.e. a way to avoid unintended use of
floating point facilities:

    https://godbolt.org/z/o1E5nrrzc

Currently it is unclear what form that could take (e.g. whether a
`-nofloat` target could be possible, "disabling" the `f*` types, just
Clippy...).

Cc'ing Catalin in case he wants to be in the loop, since I discussed
it with him recently.

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ