From: peder.bergan@gmail.com
To: miguel.ojeda.sandonis@gmail.com
Cc: ojeda@kernel.org, boqun@kernel.org, gary@garyguo.net,
bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
dakr@kernel.org, daniel.almeida@collabora.com,
tamird@kernel.org, acourbot@nvidia.com, work@onurozkan.dev,
mcgrof@kernel.org, petr.pavlu@suse.com, da.gomez@kernel.org,
samitolvanen@google.com, atomlin@atomlin.com,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, wedsonaf@gmail.com,
gprocida@google.com
Subject: Re: [PATCH] rust: put C helper exports in a dedicated namespace
Date: Sat, 21 Nov 2026 12:50:24 -0500 [thread overview]
Message-ID: <nh-eaa5d67e-6d05-468f-9f19-273bc5b23ad0@google.com> (raw)
In-Reply-To: <CANiq72kWXzP1SWUvhOT2k-rNjopnySXeBkjwrx63V2QUaLpnGQ@mail.gmail.com>
Hi Miguel,
Thanks for the review. The export formats are literals, so I'll use
:= for both. V2 already added the namespace import to KASAN's C
metadata.
https://patch.msgid.link/20261120-rust-helper-namespace-v2-1-14315658f59e@gmail.com
For v3, I'll build on Giuliano's assembly conversion and generate
EXPORT_SYMBOL_NS_GPL() directly for the helper list.
1. Would you prefer I wait for Giuliano's series to land or send v3
with it listed as a prerequisite?
2. Should I keep the KASAN import for v3 or move automatic imports
into modpost in this series?
3. If you prefer modpost, should it add the import only when a module
contains a Rust object and references a RUST_HELPERS export?
Cheers,
Peder
On Fri, 20 Nov 2026 22:34:24 +0100, Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
> On Fri, Nov 20, 2026 at 5:32 PM Peder Bergan via B4 Relay
> <devnull+peder.bergan.gmail.com@kernel.org> wrote:
> >
> > Suggested-by: Wedson Almeida Filho <wedsonaf@gmail.com>
> > Link: https://github.com/Rust-for-Linux/linux/issues/216
>
> Nice, thanks for going through these old issues! :)
>
> > +rust_export_macro = EXPORT_SYMBOL_RUST_GPL
>
> Do we need a recursively expanded variable?
>
> > +++ b/rust/exports.c
>
> Conflicts ahead; this file happens to be going away with:
>
> https://lore.kernel.org/rust-for-linux/20261112121512.1670347-3-gprocida@google.com/
>
> Cc'ing Giuliano.
>
> Also, what Sashiko says seems reasonable: if we do it this way, then
> we may need manual `MODULE_IMPORT_NS()`s in some places, which may
> become a bit annoying, even if there aren't that many mixed language
> modules so far.
>
> Actually, perhaps we could just import it in modpost if a Rust module
> has any Rust translation unit in it...
>
> Cheers,
> Miguel
prev parent reply other threads:[~2026-11-21 17:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 16:32 Peder Bergan via B4 Relay
2026-11-20 21:34 ` Miguel Ojeda
2026-11-21 17:50 ` peder.bergan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nh-eaa5d67e-6d05-468f-9f19-273bc5b23ad0@google.com \
--to=peder.bergan@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=atomlin@atomlin.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=da.gomez@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=gprocida@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=mcgrof@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=wedsonaf@gmail.com \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®