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: <CAJ-ks9khaR9juEXN-PGiF_vBztf+JRXGnAJv8oe3SY+YC6k-Xw@mail.gmail.com>
Date: Fri, 8 Nov 2024 11:39:55 -0500
From: Tamir Duberstein <tamird@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
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 <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/6] rust: types: avoid `as` casts

On Fri, Nov 8, 2024 at 11:34 AM Alice Ryhl <aliceryhl@...gle.com> wrote:
> > @@ -333,13 +334,13 @@ impl<T: 'static> ForeignOwnable for Arc<T> {
> >      type Borrowed<'a> = ArcBorrow<'a, T>;
> >
> >      fn into_foreign(self) -> *const core::ffi::c_void {
> > -        ManuallyDrop::new(self).ptr.as_ptr() as _
> > +        ManuallyDrop::new(self).ptr.as_ptr().cast_const().cast()
>
> What's up with this cast_const?

Doh, just missed it. Gone in v4.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ