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: <aOzET46lagm-p8go@google.com>
Date: Mon, 13 Oct 2025 09:20:15 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>, Burak Emir <bqe@...gle.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	"Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>, 
	Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>, 
	Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org, 
	Yury Norov <yury.norov@...il.com>, linux-kernel@...r.kernel.org, 
	patches@...ts.linux.dev
Subject: Re: [PATCH] rust: bitmap: clean Rust 1.92.0 `unused_unsafe` warning

On Mon, Oct 13, 2025 at 02:14:22AM +0200, Miguel Ojeda wrote:
> Starting with Rust 1.92.0 (expected 2025-12-11), Rust allows to safely
> take the address of a union field [1][2]:
> 
>       CLIPPY L rust/kernel.o
>     error: unnecessary `unsafe` block
>        --> rust/kernel/bitmap.rs:169:13
>         |
>     169 |             unsafe { core::ptr::addr_of!(self.repr.bitmap) }
>         |             ^^^^^^ unnecessary `unsafe` block
>         |
>         = note: `-D unused-unsafe` implied by `-D warnings`
>         = help: to override `-D warnings` add `#[allow(unused_unsafe)]`
> 
>     error: unnecessary `unsafe` block
>        --> rust/kernel/bitmap.rs:185:13
>         |
>     185 |             unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) }
>         |             ^^^^^^ unnecessary `unsafe` block
> 
> Thus allow both instances to clean the warning in newer compilers.
> 
> Link: https://github.com/rust-lang/rust/issues/141264 [1]
> Link: https://github.com/rust-lang/rust/pull/141469 [2]
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>

Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ