From: Ralf Jung <post@ralfj.de>
To: Trevor Gross <tmgross@umich.edu>, Miguel Ojeda <ojeda@kernel.org>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"moderated for non-subscribers"
<linux-arm-kernel@lists.infradead.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev, stable@vger.kernel.org,
"Matthew Maurer" <mmaurer@google.com>,
"Jubilee Young" <workingjubilee@gmail.com>
Subject: Re: [PATCH] arm64: rust: clean Rust 1.85.0 warning using softfloat target
Date: Wed, 12 Feb 2025 08:34:44 +0100 [thread overview]
Message-ID: <1cfca789-bbb9-4899-92e9-94ff78d07c50@ralfj.de> (raw)
In-Reply-To: <CALNs47uBcyTmBdTBAPXiBcAkE0-4tih9j=VAv1rRcTcf_c2yTg@mail.gmail.com>
On 11.02.25 12:10, Trevor Gross wrote:
> On Mon, Feb 10, 2025 at 10:38 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>>
>> Starting with Rust 1.85.0 (to be released 2025-02-20), `rustc` warns
>> [1] about disabling neon in the aarch64 hardfloat target:
>>
>> warning: target feature `neon` cannot be toggled with
>> `-Ctarget-feature`: unsound on hard-float targets
>> because it changes float ABI
>> |
>> = note: this was previously accepted by the compiler but
>> is being phased out; it will become a hard error
>> in a future release!
>> = note: for more information, see issue #116344
>> <https://github.com/rust-lang/rust/issues/116344>
>>
>> Thus, instead, use the softfloat target instead.
>>
>> While trying it out, I found that the kernel sanitizers were not enabled
>> for that built-in target [2]. Upstream Rust agreed to backport
>> the enablement for the current beta so that it is ready for
>> the 1.85.0 release [3] -- thanks!
>>
>> However, that still means that before Rust 1.85.0, we cannot switch
>> since sanitizers could be in use. Thus conditionally do so.
>>
>> Cc: <stable@vger.kernel.org> # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs).
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: Matthew Maurer <mmaurer@google.com>
>> Cc: Alice Ryhl <aliceryhl@google.com>
>> Cc: Ralf Jung <post@ralfj.de>
>> Cc: Jubilee Young <workingjubilee@gmail.com>
>> Link: https://github.com/rust-lang/rust/pull/133417 [1]
>> Link: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/arm64.20neon.20.60-Ctarget-feature.60.20warning/near/495358442 [2]
>> Link: https://github.com/rust-lang/rust/pull/135905 [3]
>> Link: https://github.com/rust-lang/rust/issues/116344
>> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
>
> This is consistent with what has been discussed for a while on the Rust side.
>
> Reviewed-by: Trevor Gross <tmgross@umich.edu>
I don't know the kernel side of this, but from a Rust compiler perspective using
the "-softfloat" target is definitely the right call here, at least for now
(where none of the crypto/compression code that needs SIMD is written in Rust).
Reviewed-by: Ralf Jung <post@ralfj.de>
Kind regards,
Ralf
next prev parent reply other threads:[~2025-02-12 7:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 16:37 [PATCH] arm64: rust: clean Rust 1.85.0 warning using softfloat target Miguel Ojeda
2025-02-11 10:33 ` Will Deacon
2025-02-13 12:22 ` Miguel Ojeda
2025-02-11 11:10 ` Trevor Gross
2025-02-12 0:57 ` Matthew Maurer
2025-02-12 7:34 ` Ralf Jung [this message]
2025-02-12 9:27 ` Alice Ryhl
2025-02-13 13:59 ` Will Deacon
2025-02-13 15:32 ` Ard Biesheuvel
2025-02-13 15:46 ` Ralf Jung
2025-02-13 17:12 ` Gary Guo
2025-02-13 17:18 ` Ard Biesheuvel
2025-02-13 20:17 ` Ralf Jung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1cfca789-bbb9-4899-92e9-94ff78d07c50@ralfj.de \
--to=post@ralfj.de \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=gary@garyguo.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmaurer@google.com \
--cc=ojeda@kernel.org \
--cc=patches@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=will@kernel.org \
--cc=workingjubilee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox