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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d31b24c850957c9026c9ff12ce7d0c9bbf26477a.camel@mailbox.org>
Date: Tue, 18 Nov 2025 10:33:40 +0100
From: Philipp Stanner <phasta@...lbox.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, phasta@...nel.org
Cc: 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
 <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl
 <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich
 <dakr@...nel.org>, Tamir Duberstein <tamird@...il.com>, Christian Schrefl
 <chrisi.schrefl@...il.com>,  rust-for-linux@...r.kernel.org,
 linux-kernel@...r.kernel.org,  stable@...r.kernel.org
Subject: Re: [PATCH v2] rust: list: Add unsafe for container_of

On Tue, 2025-11-18 at 10:00 +0100, Miguel Ojeda wrote:
> On Tue, Nov 18, 2025 at 9:30 AM Philipp Stanner <phasta@...lbox.org> wrote:
> > 
> > It's absolutely common to provide it. If you feel better without it, I
> > can omit it, I guess.
> 
> No, it is not "absolutely common" to provide it in a case like this,
> and it is not about "feeling better" either.

It *is* absolutely common, or at least frequent, and you are the first
guy in the entire project I ever heard complaining about it. Maybe it
is often used wrongly or unnecessarily, though.

But no worries, be assured that I will take this detail into account
when working with you.

> 
> > I ran rustfmt.
> 
> Yes, but this is a macro -- `rustfmt` is likely not formatting that
> code. In formatted code, there are no multiline `unsafe` blocks that
> contain code after the opening brace, so it looks off.

So why then do you even suggest running rustfmt? How should I make it
check the formatting?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ