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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXdrUsrKVmzpBVd8@google.com>
Date: Mon, 26 Jan 2026 13:25:38 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Gary Guo <gary@...yguo.net>
Cc: Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, 
	"Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>, 
	Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>, 
	Danilo Krummrich <dakr@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>, 
	Viresh Kumar <viresh.kumar@...aro.org>, Igor Korotin <igor.korotin.linux@...il.com>, 
	Daniel Almeida <daniel.almeida@...labora.com>, Len Brown <lenb@...nel.org>, 
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-pm@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH 0/4] Re-export Zeroable and zeroed() from ffi module

On Mon, Jan 26, 2026 at 01:15:53PM +0000, Gary Guo wrote:
> On Mon Jan 26, 2026 at 1:05 PM GMT, Alice Ryhl wrote:
> > Currently, the Zeroable trait is defined by pin-init because pin-init
> > happens to use the trait. However, zeroed types are useful for many
> > purposes other than pin-init. Also, we wish to implement Zeroable for
> > types generated by bindgen. For both of these reasons, re-export
> > Zeroable from the ffi crate, which is a already dependency of the crates
> > with bindgen output.
> 
> I don't see a benefit of re-exporting these from the `ffi` crate? Especially
> that we re-export `ffi` crate from kernel crate anyway, and `Zeroable` is
> already in the kernel prelude.
> 
> We already derive `Zeroable` for bindgen via `MaybeZeroable` derive in
> rust/bindgen_parameters.

I can't find the convo now, but this change is on my list from when we
discussed also implementing FromBytes / IntoBytes for the bindings
types. To do that, we need to move our FromBytes / IntoBytes traits
somewhere that bindings/uapi can access, and we agreed that the ffi
crate was a good place for it.

And then for consistency, also reexport Zeroable from the same location.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ