* [PATCH v2 07/27] rust: cred: add __rust_helper to helpers
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
@ 2026-01-05 12:42 ` Alice Ryhl
2026-01-07 1:25 ` Paul Moore
2026-01-05 12:42 ` [PATCH v2 18/27] rust: security: " Alice Ryhl
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Alice Ryhl @ 2026-01-05 12:42 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, Alice Ryhl, Boqun Feng, Gary Guo, Paul Moore,
Serge Hallyn, linux-security-module
This is needed to inline these helpers into Rust code.
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge Hallyn <sergeh@kernel.org>
Cc: linux-security-module@vger.kernel.org
---
rust/helpers/cred.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/helpers/cred.c b/rust/helpers/cred.c
index fde7ae20cdd19f04ac5f28808586c65de6b72f09..a56a7b7536232733dcdc640f09f8f2537e69d75e 100644
--- a/rust/helpers/cred.c
+++ b/rust/helpers/cred.c
@@ -2,12 +2,12 @@
#include <linux/cred.h>
-const struct cred *rust_helper_get_cred(const struct cred *cred)
+__rust_helper const struct cred *rust_helper_get_cred(const struct cred *cred)
{
return get_cred(cred);
}
-void rust_helper_put_cred(const struct cred *cred)
+__rust_helper void rust_helper_put_cred(const struct cred *cred)
{
put_cred(cred);
}
--
2.52.0.351.gbe84eed79e-goog
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 07/27] rust: cred: add __rust_helper to helpers
2026-01-05 12:42 ` [PATCH v2 07/27] rust: cred: add __rust_helper to helpers Alice Ryhl
@ 2026-01-07 1:25 ` Paul Moore
2026-01-07 1:29 ` Paul Moore
0 siblings, 1 reply; 10+ messages in thread
From: Paul Moore @ 2026-01-07 1:25 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Serge Hallyn,
linux-security-module
On Mon, Jan 5, 2026 at 7:42 AM Alice Ryhl <aliceryhl@google.com> wrote:
>
> This is needed to inline these helpers into Rust code.
>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: Serge Hallyn <sergeh@kernel.org>
> Cc: linux-security-module@vger.kernel.org
> ---
> rust/helpers/cred.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Paul Moore <paul@paul-moore.com>
--
paul-moore.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 07/27] rust: cred: add __rust_helper to helpers
2026-01-07 1:25 ` Paul Moore
@ 2026-01-07 1:29 ` Paul Moore
2026-01-07 6:53 ` Alice Ryhl
0 siblings, 1 reply; 10+ messages in thread
From: Paul Moore @ 2026-01-07 1:29 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Serge Hallyn,
linux-security-module
On Tue, Jan 6, 2026 at 8:25 PM Paul Moore <paul@paul-moore.com> wrote:
>
> On Mon, Jan 5, 2026 at 7:42 AM Alice Ryhl <aliceryhl@google.com> wrote:
> >
> > This is needed to inline these helpers into Rust code.
> >
> > Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> > Reviewed-by: Gary Guo <gary@garyguo.net>
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> > ---
> > Cc: Paul Moore <paul@paul-moore.com>
> > Cc: Serge Hallyn <sergeh@kernel.org>
> > Cc: linux-security-module@vger.kernel.org
> > ---
> > rust/helpers/cred.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Paul Moore <paul@paul-moore.com>
Ooops, sorry, I just saw that these were okay to merge into the
various subsystem trees. Merged into lsm/dev, thanks.
--
paul-moore.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 07/27] rust: cred: add __rust_helper to helpers
2026-01-07 1:29 ` Paul Moore
@ 2026-01-07 6:53 ` Alice Ryhl
0 siblings, 0 replies; 10+ messages in thread
From: Alice Ryhl @ 2026-01-07 6:53 UTC (permalink / raw)
To: Paul Moore
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo, Serge Hallyn,
linux-security-module
On Wed, Jan 7, 2026 at 2:29 AM Paul Moore <paul@paul-moore.com> wrote:
>
> On Tue, Jan 6, 2026 at 8:25 PM Paul Moore <paul@paul-moore.com> wrote:
> >
> > On Mon, Jan 5, 2026 at 7:42 AM Alice Ryhl <aliceryhl@google.com> wrote:
> > >
> > > This is needed to inline these helpers into Rust code.
> > >
> > > Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> > > Reviewed-by: Gary Guo <gary@garyguo.net>
> > > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> > > ---
> > > Cc: Paul Moore <paul@paul-moore.com>
> > > Cc: Serge Hallyn <sergeh@kernel.org>
> > > Cc: linux-security-module@vger.kernel.org
> > > ---
> > > rust/helpers/cred.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Acked-by: Paul Moore <paul@paul-moore.com>
>
> Ooops, sorry, I just saw that these were okay to merge into the
> various subsystem trees. Merged into lsm/dev, thanks.
Thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 18/27] rust: security: add __rust_helper to helpers
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
2026-01-05 12:42 ` [PATCH v2 07/27] rust: cred: add __rust_helper to helpers Alice Ryhl
@ 2026-01-05 12:42 ` Alice Ryhl
2026-01-07 1:29 ` Paul Moore
2026-01-05 15:41 ` [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Boqun Feng
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Alice Ryhl @ 2026-01-05 12:42 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, Alice Ryhl, Boqun Feng, Gary Guo, Paul Moore,
Greg Kroah-Hartman, linux-security-module
This is needed to inline these helpers into Rust code.
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Paul Moore <paul@paul-moore.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-security-module@vger.kernel.org
---
rust/helpers/security.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/rust/helpers/security.c b/rust/helpers/security.c
index ca22da09548dfed95a83168ed09263e75cf08fd2..8d0a25fcf931ac6540a986aa10187c345614fc9e 100644
--- a/rust/helpers/security.c
+++ b/rust/helpers/security.c
@@ -3,41 +3,45 @@
#include <linux/security.h>
#ifndef CONFIG_SECURITY
-void rust_helper_security_cred_getsecid(const struct cred *c, u32 *secid)
+__rust_helper void rust_helper_security_cred_getsecid(const struct cred *c,
+ u32 *secid)
{
security_cred_getsecid(c, secid);
}
-int rust_helper_security_secid_to_secctx(u32 secid, struct lsm_context *cp)
+__rust_helper int rust_helper_security_secid_to_secctx(u32 secid,
+ struct lsm_context *cp)
{
return security_secid_to_secctx(secid, cp);
}
-void rust_helper_security_release_secctx(struct lsm_context *cp)
+__rust_helper void rust_helper_security_release_secctx(struct lsm_context *cp)
{
security_release_secctx(cp);
}
-int rust_helper_security_binder_set_context_mgr(const struct cred *mgr)
+__rust_helper int
+rust_helper_security_binder_set_context_mgr(const struct cred *mgr)
{
return security_binder_set_context_mgr(mgr);
}
-int rust_helper_security_binder_transaction(const struct cred *from,
- const struct cred *to)
+__rust_helper int
+rust_helper_security_binder_transaction(const struct cred *from,
+ const struct cred *to)
{
return security_binder_transaction(from, to);
}
-int rust_helper_security_binder_transfer_binder(const struct cred *from,
- const struct cred *to)
+__rust_helper int
+rust_helper_security_binder_transfer_binder(const struct cred *from,
+ const struct cred *to)
{
return security_binder_transfer_binder(from, to);
}
-int rust_helper_security_binder_transfer_file(const struct cred *from,
- const struct cred *to,
- const struct file *file)
+__rust_helper int rust_helper_security_binder_transfer_file(
+ const struct cred *from, const struct cred *to, const struct file *file)
{
return security_binder_transfer_file(from, to, file);
}
--
2.52.0.351.gbe84eed79e-goog
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 18/27] rust: security: add __rust_helper to helpers
2026-01-05 12:42 ` [PATCH v2 18/27] rust: security: " Alice Ryhl
@ 2026-01-07 1:29 ` Paul Moore
0 siblings, 0 replies; 10+ messages in thread
From: Paul Moore @ 2026-01-07 1:29 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo,
Greg Kroah-Hartman, linux-security-module
On Mon, Jan 5, 2026 at 7:43 AM Alice Ryhl <aliceryhl@google.com> wrote:
>
> This is needed to inline these helpers into Rust code.
>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-security-module@vger.kernel.org
> ---
> rust/helpers/security.c | 26 +++++++++++++++-----------
> 1 file changed, 15 insertions(+), 11 deletions(-)
Merged into lsm/dev, thanks.
--
paul-moore.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
2026-01-05 12:42 ` [PATCH v2 07/27] rust: cred: add __rust_helper to helpers Alice Ryhl
2026-01-05 12:42 ` [PATCH v2 18/27] rust: security: " Alice Ryhl
@ 2026-01-05 15:41 ` Boqun Feng
2026-01-26 5:08 ` Miguel Ojeda
2026-03-10 10:56 ` Miguel Ojeda
4 siblings, 0 replies; 10+ messages in thread
From: Boqun Feng @ 2026-01-05 15:41 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Gary Guo, Peter Zijlstra,
Elle Rhumsaa, Andreas Hindborg, linux-block, FUJITA Tomonori,
Miguel Ojeda, Michael Turquette, Stephen Boyd, linux-clk,
Benno Lossin, Danilo Krummrich, Thomas Gleixner, Paul Moore,
Serge Hallyn, linux-security-module, Josh Poimboeuf, Jason Baron,
Steven Rostedt, Ard Biesheuvel, Andrew Ballance, Andrew Morton,
Liam R. Howlett, maple-tree, linux-mm, Lorenzo Stoakes,
Uladzislau Rezki, Vitaly Wool, Rob Herring, devicetree,
Daniel Almeida, Michal Wilczynski, linux-pwm, Paul E. McKenney,
rcu, Will Deacon, Fiona Behrens, Greg Kroah-Hartman,
Vlastimil Babka, Christoph Lameter, David Rientjes, Ingo Molnar,
Waiman Long, Mitchell Levy, Frederic Weisbecker, Lyude Paul,
Anna-Maria Behnsen, John Stultz, linux-usb, Tejun Heo,
Lai Jiangshan, Matthew Wilcox, Tamir Duberstein, linux-fsdevel
On Mon, Jan 05, 2026 at 12:42:13PM +0000, Alice Ryhl wrote:
> This patch series adds __rust_helper to every single rust helper. The
> patches do not depend on each other, so maintainers please go ahead and
> pick up any patches relevant to your subsystem! Or provide your Acked-by
> so that Miguel can pick them up.
>
I queued the following into rust-sync:
rust: barrier: add __rust_helper to helpers
rust: blk: add __rust_helper to helpers
rust: completion: add __rust_helper to helpers
rust: cpu: add __rust_helper to helpers
rust: processor: add __rust_helper to helpers
rust: rcu: add __rust_helper to helpers
rust: refcount: add __rust_helper to helpers
rust: sync: add __rust_helper to helpers
rust: task: add __rust_helper to helpers
rust: time: add __rust_helper to helpers
rust: wait: add __rust_helper to helpers
Thanks!
Regards,
Boqun
> These changes were generated by adding __rust_helper and running
> ClangFormat. Unrelated formatting changes were removed manually.
>
[...]
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
` (2 preceding siblings ...)
2026-01-05 15:41 ` [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Boqun Feng
@ 2026-01-26 5:08 ` Miguel Ojeda
2026-03-10 10:56 ` Miguel Ojeda
4 siblings, 0 replies; 10+ messages in thread
From: Miguel Ojeda @ 2026-01-26 5:08 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo,
Peter Zijlstra, Elle Rhumsaa, Andreas Hindborg, linux-block,
FUJITA Tomonori, Miguel Ojeda, Michael Turquette, Stephen Boyd,
linux-clk, Benno Lossin, Danilo Krummrich, Thomas Gleixner,
Paul Moore, Serge Hallyn, linux-security-module, Josh Poimboeuf,
Jason Baron, Steven Rostedt, Ard Biesheuvel, Andrew Ballance,
Andrew Morton, Liam R. Howlett, maple-tree, linux-mm,
Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool, Rob Herring,
devicetree, Daniel Almeida, Michal Wilczynski, linux-pwm,
Paul E. McKenney, rcu, Will Deacon, Fiona Behrens,
Greg Kroah-Hartman, Vlastimil Babka, Christoph Lameter,
David Rientjes, Ingo Molnar, Waiman Long, Mitchell Levy,
Frederic Weisbecker, Lyude Paul, Anna-Maria Behnsen, John Stultz,
linux-usb, Tejun Heo, Lai Jiangshan, Matthew Wilcox,
Tamir Duberstein, linux-fsdevel
On Mon, Jan 5, 2026 at 1:42 PM Alice Ryhl <aliceryhl@google.com> wrote:
>
> rust: bug: add __rust_helper to helpers
> rust: err: add __rust_helper to helpers
> rust: maple_tree: add __rust_helper to helpers
> rust: mm: add __rust_helper to helpers
> rust: of: add __rust_helper to helpers
> rust: rbtree: add __rust_helper to helpers
> rust: slab: add __rust_helper to helpers
> rust: uaccess: add __rust_helper to helpers
> rust: workqueue: add __rust_helper to helpers
Applied these to `rust-next` -- thanks everyone!
If someone did not intend for me to take it even if the Acked-by is
there (e.g. perhaps Andrew wanted to pick those nevertheless?), then
please shout.
With this, and if I didn't miss any message (plus looking at
linux-next where I see Greg picked usb), then only clk and jump_label
remain (plus any new incoming one).
Let's see if we can get them done next cycle then.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
` (3 preceding siblings ...)
2026-01-26 5:08 ` Miguel Ojeda
@ 2026-03-10 10:56 ` Miguel Ojeda
4 siblings, 0 replies; 10+ messages in thread
From: Miguel Ojeda @ 2026-03-10 10:56 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo,
Peter Zijlstra, Elle Rhumsaa, Andreas Hindborg, linux-block,
FUJITA Tomonori, Miguel Ojeda, Michael Turquette, Stephen Boyd,
linux-clk, Benno Lossin, Danilo Krummrich, Thomas Gleixner,
Paul Moore, Serge Hallyn, linux-security-module, Josh Poimboeuf,
Jason Baron, Steven Rostedt, Ard Biesheuvel, Andrew Ballance,
Andrew Morton, Liam R. Howlett, maple-tree, linux-mm,
Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool, Rob Herring,
devicetree, Daniel Almeida, Michal Wilczynski, linux-pwm,
Paul E. McKenney, rcu, Will Deacon, Fiona Behrens,
Greg Kroah-Hartman, Vlastimil Babka, Christoph Lameter,
David Rientjes, Ingo Molnar, Waiman Long, Mitchell Levy,
Frederic Weisbecker, Lyude Paul, Anna-Maria Behnsen, John Stultz,
linux-usb, Tejun Heo, Lai Jiangshan, Matthew Wilcox,
Tamir Duberstein, linux-fsdevel
On Mon, Jan 5, 2026 at 1:42 PM Alice Ryhl <aliceryhl@google.com> wrote:
>
> rust: clk: add __rust_helper to helpers
> rust: jump_label: add __rust_helper to helpers
Applied these to `rust-next` -- thanks everyone!
With these, the series is complete.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 10+ messages in thread