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: <77089cc6-233c-9329-a994-95ae6d3d07e3@ryhl.io>
Date:   Wed, 14 Jun 2023 16:37:42 +0200
From:   Alice Ryhl <alice@...l.io>
To:     Benno Lossin <benno.lossin@...ton.me>
Cc:     rust-for-linux@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>,
        Wedson Almeida Filho <wedsonaf@...il.com>,
        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>,
        linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH] rust: make `UnsafeCell` the outer type in `Opaque`

On 6/14/23 16:27, Benno Lossin wrote:>> @@ -258,7 +258,7 @@ pub fn 
ffi_init(init_func: impl FnOnce(*mut T)) -> impl PinInit<Self> {
>>
>>        /// Returns a raw pointer to the opaque data.
>>        pub fn get(&self) -> *mut T {
>> -        UnsafeCell::raw_get(self.0.as_ptr())
>> +        UnsafeCell::get(&self.0).cast::<T>()
> 
> Is there a reason you don't do `self.0.get().cast::<T>()`?
> 

Not really. I just modified what was already there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ