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] [day] [month] [year] [list]
Message-ID: <2025071348-jogger-clarity-641c@gregkh>
Date: Sun, 13 Jul 2025 16:41:56 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Benno Lossin <lossin@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>, Sasha Levin <sashal@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>, stable@...r.kernel.org,
	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>,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
	patches@...ts.linux.dev
Subject: Re: [PATCH 6.12.y] rust: init: allow `dead_code` warnings for Rust
 >= 1.89.0

On Sat, Jul 12, 2025 at 08:04:48PM +0200, Benno Lossin wrote:
> On Sat Jul 12, 2025 at 7:10 PM CEST, Miguel Ojeda wrote:
> > Starting with Rust 1.89.0 (expected 2025-08-07), the Rust compiler
> > may warn:
> >
> >     error: trait `MustNotImplDrop` is never used
> >        --> rust/kernel/init/macros.rs:927:15
> >         |
> >     927 |         trait MustNotImplDrop {}
> >         |               ^^^^^^^^^^^^^^^
> >         |
> >        ::: rust/kernel/sync/arc.rs:133:1
> >         |
> >     133 | #[pin_data]
> >         | ----------- in this procedural macro expansion
> >         |
> >         = note: `-D dead-code` implied by `-D warnings`
> >         = help: to override `-D warnings` add `#[allow(dead_code)]`
> >         = note: this error originates in the macro `$crate::__pin_data`
> >                 which comes from the expansion of the attribute macro
> >                 `pin_data` (in Nightly builds, run with
> >                 -Z macro-backtrace for more info)
> >
> > Thus `allow` it to clean it up.
> 
> This is a bit strange, I can't directly reproduce the issue... I already
> get this warning in 1.88:
> 
>     https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=465f71a848e77ac3f7a96a0af6bc9e2a
> 
> > This does not happen in mainline nor 6.15.y, because there the macro was
> > moved out of the `kernel` crate, and `dead_code` warnings are not
> > emitted if the macro is foreign to the crate. Thus this patch is
> > directly sent to stable and intended for 6.12.y only.
> >
> > Similarly, it is not needed in previous LTSs, because there the Rust
> > version is pinned.
> >
> > Cc: Benno Lossin <lossin@...nel.org>
> > Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> 
> Anyways the patch itself looks fine, nobody should care about the
> dead-code warning (since it is in fact used to prevent `Drop` being
> implemented).
> 
> Acked-by: Benno Lossin <lossin@...nel.org>

Thanks, now queued up.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ