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: <b3c013cf-8447-4159-8fb9-a4e230689450@gmail.com>
Date:   Sat, 5 Aug 2023 14:12:47 -0300
From:   Martin Rodriguez Reboredo <yakoyoku@...il.com>
To:     Benno Lossin <benno.lossin@...ton.me>,
        Miguel Ojeda <ojeda@...nel.org>,
        Wedson Almeida Filho <wedsonaf@...il.com>,
        Alex Gaynor <alex.gaynor@...il.com>
Cc:     Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        Alice Ryhl <aliceryhl@...gle.com>,
        Andreas Hindborg <nmi@...aspace.dk>,
        rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 10/13] rust: init: implement `Zeroable` for
 `UnsafeCell<T>` and `Opaque<T>`

On 7/29/23 06:10, Benno Lossin wrote:
> `UnsafeCell<T>` and `T` have the same layout so if `T` is `Zeroable`
> then so should `UnsafeCell<T>` be. This allows using the derive macro
> for `Zeroable` on types that contain an `UnsafeCell<T>`.
> Since `Opaque<T>` contains a `MaybeUninit<T>`, all bytes zero is a valid
> bit pattern for that type.
> 
> Signed-off-by: Benno Lossin <benno.lossin@...ton.me>
> ---
> [...]
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ