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: <DG7UGTYDW2G0.37554HSAB6IXY@kernel.org>
Date: Fri, 06 Feb 2026 12:32:37 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Greg KH" <gregkh@...uxfoundation.org>
Cc: <rafael@...nel.org>, <ojeda@...nel.org>, <boqun.feng@...il.com>,
 <gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, <lossin@...nel.org>,
 <a.hindborg@...nel.org>, <aliceryhl@...gle.com>, <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 12:04 PM CET, Greg KH wrote:
> On Fri, Feb 06, 2026 at 11:43:48AM +0100, Danilo Krummrich wrote:
>> On Thu Feb 5, 2026 at 11:31 PM CET, Danilo Krummrich wrote:
>> > +EXPORT_SYMBOL_GPL(devres_node_init);
>> 
>> I actually intended to use a Rust helper instead of exporting those symbols
>> directly, but forgot to do it eventually.
>> 
>
> I don't understand, does that mean we do not need to export these?
> Shouldn't the rust bindings just export these symbols are rust exports,
> and the C exports are not needed?
>
> We "only" want these symbols to go to the rust binding, not to any
> module at all, which is what this patch series does, and is probably not
> a good idea.

Correct, I just forgot to replace the exports with a Rust helper.

The Rust compiler might inline some of the core code into modules (e.g. due to
generics), thus requiring an export.

But, instead of adding

	EXPORT_SYMBOL_GPL(devres_node_init)

in drivers/base/devres.c, I actually intended to create a Rust helper in
rust/helpers/devres.c:

	__rust_helper void rust_helper_devres_node_init(struct devres_node *node,
							dr_node_release_t release,
							dr_node_free_t free_node)
	{
		devres_nod_init(node, release, free_node);
	}

This will automatically create:

	EXPORT_SYMBOL_RUST_GPL(rust_helper_devres_node_init)

behind the scenes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ