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: <CAJ-ks9mcXX631WRk6P=5Z18mFPopLNt5_L96B7-oJEmOP_oTrw@mail.gmail.com>
Date: Thu, 27 Feb 2025 11:36:16 -0500
From: Tamir Duberstein <tamird@...il.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Andreas Hindborg <a.hindborg@...nel.org>, Danilo Krummrich <dakr@...nel.org>, 
	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>, Alice Ryhl <aliceryhl@...gle.com>, 
	Trevor Gross <tmgross@...ch.edu>, Joel Becker <jlbec@...lplan.org>, 
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>, 
	Waiman Long <longman@...hat.com>, Fiona Behrens <me@...enk.dev>, 
	Charalampos Mitrodimas <charmitro@...teo.net>, Daniel Almeida <daniel.almeida@...labora.com>, 
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/4] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo`
 to `T`

On Thu, Feb 27, 2025 at 11:34 AM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Thu, Feb 27, 2025 at 2:49 PM Tamir Duberstein <tamird@...il.com> wrote:
> >
> > Isn't the unsafe bit `*this`, which is what this comment should
> > justify? In Rust 1.82+ `addr_of_mut!` isn't unsafe I believe. Also `x`
> > is likely meant to be `this`.
>
> `addr_of_mut!` could also be called safely in many cases even before
> 1.82, i.e. it depends on the expression (and that is still true in
> 1.82+). The change in that version was about referring to static muts
> and extern statics.

Thanks for explaining! Was I correct about the unsafe operation here
being the dereference?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ