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: <DG7XSHZ4G0QN.1T6T20R4GCF52@kernel.org>
Date: Fri, 06 Feb 2026 15:08:54 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Alice Ryhl" <aliceryhl@...gle.com>
Cc: "Greg KH" <gregkh@...uxfoundation.org>, <rafael@...nel.org>,
 <ojeda@...nel.org>, <boqun.feng@...il.com>, <gary@...yguo.net>,
 <bjorn3_gh@...tonmail.com>, <lossin@...nel.org>, <a.hindborg@...nel.org>,
 <tmgross@...ch.edu>, <driver-core@...ts.linux.dev>,
 <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] devres: export devres_node_init() and
 devres_node_add()

On Fri Feb 6, 2026 at 2:33 PM CET, Alice Ryhl wrote:
> So you'd need a non-generic Rust function with #[inline(never)] in this case,
> and have Devres::<T>::new() call that function.

Then we should probably figure out how we can teach bindgen to apply
#[inline(never)] for functions that are not exported. Because I don't think we
always want to write such wrappers by hand.

	#[inline(never)]
	#[allow(clippy::missing_safety_doc)]
	unsafe fn devres_node_init(
	    node: *mut bindings::devres_node,
	    release: bindings::dr_node_release_t,
	    free: bindings::dr_node_free_t,
	) {
	    // SAFETY: `devres_node_init()` inherits the safety requirements of
	    //         `bindings::devres_node_init()`.
	    unsafe { bindings::devres_node_init(node, release, free) };
	}

(I could probably abstract it on a higher level, but it would still create quite
some (unsafe) churn.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ