rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/46] Allow inlining C helpers into Rust when using LTO
@ 2025-12-02 19:37 Alice Ryhl
  2025-12-02 19:37 ` [PATCH 01/46] rust: auxiliary: add __rust_helper to helpers Alice Ryhl
                   ` (48 more replies)
  0 siblings, 49 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Greg Kroah-Hartman, Dave Ertman,
	Ira Weiny, Leon Romanovsky, Peter Zijlstra, Boqun Feng,
	Elle Rhumsaa, Carlos Llamas, Yury Norov, Andreas Hindborg,
	linux-block, FUJITA Tomonori, Miguel Ojeda, Michael Turquette,
	Stephen Boyd, linux-clk, Benno Lossin, Danilo Krummrich,
	Thomas Gleixner, Rafael J. Wysocki, Viresh Kumar, linux-pm,
	Paul Moore, Serge Hallyn, linux-security-module, Daniel Almeida,
	Abdiel Janulgue, Robin Murphy, Lyude Paul, Alexander Viro,
	Christian Brauner, Jan Kara, linux-fsdevel, Josh Poimboeuf,
	Jason Baron, Steven Rostedt, Ard Biesheuvel, Brendan Higgins,
	David Gow, Rae Moar, linux-kselftest, Andrew Morton,
	Liam R. Howlett, Andrew Ballance, maple-tree, linux-mm,
	Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool, Rob Herring,
	Saravana Kannan, devicetree, Bjorn Helgaas,
	Krzysztof Wilczyński, linux-pci, Remo Senekowitsch,
	Paul E. McKenney, rcu, Will Deacon, Fiona Behrens, Gary Guo,
	Liam Girdwood, Mark Brown, Alexandre Courbot, Vlastimil Babka,
	Christoph Lameter, David Rientjes, Ingo Molnar, Waiman Long,
	Mitchell Levy, Frederic Weisbecker, Anna-Maria Behnsen,
	John Stultz, linux-usb, Tejun Heo, Lai Jiangshan, Matthew Wilcox,
	Tamir Duberstein

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.

These changes were generated by adding __rust_helper and running
ClangFormat. Unrelated formatting changes were removed manually.

Why is __rust_helper needed?
============================

Currently, C helpers cannot be inlined into Rust even when using LTO
because LLVM detects slightly different options on the codegen units.

* LLVM doesn't want to inline functions compiled with
  `-fno-delete-null-pointer-checks` with code compiled without. The C
  CGUs all have this enabled and Rust CGUs don't. Inlining is okay since
  this is one of the hardening features that does not change the ABI,
  and we shouldn't have null pointer dereferences in these helpers.

* LLVM doesn't want to inline functions with different list of builtins. C
  side has `-fno-builtin-wcslen`; `wcslen` is not a Rust builtin, so
  they should be compatible, but LLVM does not perform inlining due to
  attributes mismatch.

* clang and Rust doesn't have the exact target string. Clang generates
  `+cmov,+cx8,+fxsr` but Rust doesn't enable them (in fact, Rust will
  complain if `-Ctarget-feature=+cmov,+cx8,+fxsr` is used). x86-64
  always enable these features, so they are in fact the same target
  string, but LLVM doesn't understand this and so inlining is inhibited.
  This can be bypassed with `--ignore-tti-inline-compatible`, but this
  is a hidden option.

(This analysis was written by Gary Guo.)

How is this fixed?
==================

To fix this we need to add __always_inline to all helpers when compiling
with LTO. However, it should not be added when running bindgen as
bindgen will ignore functions marked inline. To achieve this, we are
using a #define called __rust_helper that is defined differently
depending on whether bindgen is running or not.

Note that __rust_helper is currently always #defined to nothing.
Changing it to __always_inline will happen separately in another patch
series.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Alice Ryhl (46):
      rust: auxiliary: add __rust_helper to helpers
      rust: barrier: add __rust_helper to helpers
      rust: binder: add __rust_helper to helpers
      rust: bitmap: add __rust_helper to helpers
      rust: bitops: add __rust_helper to helpers
      rust: blk: add __rust_helper to helpers
      rust: bug: add __rust_helper to helpers
      rust: clk: add __rust_helper to helpers
      rust: completion: add __rust_helper to helpers
      rust: cpu: add __rust_helper to helpers
      rust: cpufreq: add __rust_helper to helpers
      rust: cpumask: add __rust_helper to helpers
      rust: cred: add __rust_helper to helpers
      rust: device: add __rust_helper to helpers
      rust: dma: add __rust_helper to helpers
      rust: drm: add __rust_helper to helpers
      rust: err: add __rust_helper to helpers
      rust: fs: add __rust_helper to helpers
      rust: io: add __rust_helper to helpers
      rust: irq: add __rust_helper to helpers
      rust: jump_label: add __rust_helper to helpers
      rust: kunit: 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: pci: add __rust_helper to helpers
      rust: pid_namespace: add __rust_helper to helpers
      rust: platform: add __rust_helper to helpers
      rust: poll: add __rust_helper to helpers
      rust: processor: add __rust_helper to helpers
      rust: property: add __rust_helper to helpers
      rust: rbtree: add __rust_helper to helpers
      rust: rcu: add __rust_helper to helpers
      rust: refcount: add __rust_helper to helpers
      rust: regulator: add __rust_helper to helpers
      rust: scatterlist: add __rust_helper to helpers
      rust: security: add __rust_helper to helpers
      rust: slab: 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: uaccess: add __rust_helper to helpers
      rust: usb: add __rust_helper to helpers
      rust: wait: add __rust_helper to helpers
      rust: workqueue: add __rust_helper to helpers
      rust: xarray: add __rust_helper to helpers

 rust/helpers/auxiliary.c     |  6 +++--
 rust/helpers/barrier.c       |  6 ++---
 rust/helpers/binder.c        | 13 ++++-----
 rust/helpers/bitmap.c        |  6 +++--
 rust/helpers/bitops.c        | 11 +++++---
 rust/helpers/blk.c           |  4 +--
 rust/helpers/bug.c           |  4 +--
 rust/helpers/build_bug.c     |  2 +-
 rust/helpers/clk.c           | 24 +++++++++--------
 rust/helpers/completion.c    |  2 +-
 rust/helpers/cpu.c           |  2 +-
 rust/helpers/cpufreq.c       |  3 ++-
 rust/helpers/cpumask.c       | 32 +++++++++++++---------
 rust/helpers/cred.c          |  4 +--
 rust/helpers/device.c        | 16 +++++------
 rust/helpers/dma.c           | 15 ++++++-----
 rust/helpers/drm.c           |  7 ++---
 rust/helpers/err.c           |  6 ++---
 rust/helpers/fs.c            |  2 +-
 rust/helpers/io.c            | 64 +++++++++++++++++++++++---------------------
 rust/helpers/irq.c           |  6 +++--
 rust/helpers/jump_label.c    |  2 +-
 rust/helpers/kunit.c         |  2 +-
 rust/helpers/maple_tree.c    |  3 ++-
 rust/helpers/mm.c            | 20 +++++++-------
 rust/helpers/mutex.c         | 13 ++++-----
 rust/helpers/of.c            |  2 +-
 rust/helpers/page.c          |  9 ++++---
 rust/helpers/pci.c           | 13 +++++----
 rust/helpers/pid_namespace.c |  8 +++---
 rust/helpers/platform.c      |  2 +-
 rust/helpers/poll.c          |  5 ++--
 rust/helpers/processor.c     |  2 +-
 rust/helpers/property.c      |  2 +-
 rust/helpers/rbtree.c        |  5 ++--
 rust/helpers/rcu.c           |  4 +--
 rust/helpers/refcount.c      | 10 +++----
 rust/helpers/regulator.c     | 24 ++++++++++-------
 rust/helpers/scatterlist.c   | 12 +++++----
 rust/helpers/security.c      | 26 ++++++++++--------
 rust/helpers/signal.c        |  2 +-
 rust/helpers/slab.c          | 14 +++++-----
 rust/helpers/spinlock.c      | 13 ++++-----
 rust/helpers/sync.c          |  4 +--
 rust/helpers/task.c          | 24 ++++++++---------
 rust/helpers/time.c          | 12 ++++-----
 rust/helpers/uaccess.c       |  8 +++---
 rust/helpers/usb.c           |  3 ++-
 rust/helpers/vmalloc.c       |  7 ++---
 rust/helpers/wait.c          |  2 +-
 rust/helpers/workqueue.c     |  8 +++---
 rust/helpers/xarray.c        | 10 +++----
 52 files changed, 280 insertions(+), 226 deletions(-)
---
base-commit: 54e3eae855629702c566bd2e130d9f40e7f35bde
change-id: 20251202-define-rust-helper-f7b531813007

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [PATCH 01/46] rust: auxiliary: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 02/46] rust: barrier: " Alice Ryhl
                   ` (47 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Greg Kroah-Hartman, Dave Ertman,
	Ira Weiny, Leon Romanovsky

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dave Ertman <david.m.ertman@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Leon Romanovsky <leon@kernel.org>
---
 rust/helpers/auxiliary.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/auxiliary.c b/rust/helpers/auxiliary.c
index 8b5e0fea449367ce6f462b421fa37a12a0ec11cf..dd1c130843a09a5688d5f7b620f2dc709a5ac5cd 100644
--- a/rust/helpers/auxiliary.c
+++ b/rust/helpers/auxiliary.c
@@ -2,12 +2,14 @@
 
 #include <linux/auxiliary_bus.h>
 
-void rust_helper_auxiliary_device_uninit(struct auxiliary_device *adev)
+__rust_helper void
+rust_helper_auxiliary_device_uninit(struct auxiliary_device *adev)
 {
 	return auxiliary_device_uninit(adev);
 }
 
-void rust_helper_auxiliary_device_delete(struct auxiliary_device *adev)
+__rust_helper void
+rust_helper_auxiliary_device_delete(struct auxiliary_device *adev)
 {
 	return auxiliary_device_delete(adev);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 02/46] rust: barrier: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
  2025-12-02 19:37 ` [PATCH 01/46] rust: auxiliary: add __rust_helper to helpers Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 03/46] rust: binder: " Alice Ryhl
                   ` (46 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Peter Zijlstra, Boqun Feng,
	Elle Rhumsaa

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Elle Rhumsaa <elle@weathered-steel.dev>
---
 rust/helpers/barrier.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rust/helpers/barrier.c b/rust/helpers/barrier.c
index cdf28ce8e5116728c97e24893cf12ef41578d3ac..fed8853745c83639c32f79335e40b9494db11e98 100644
--- a/rust/helpers/barrier.c
+++ b/rust/helpers/barrier.c
@@ -2,17 +2,17 @@
 
 #include <asm/barrier.h>
 
-void rust_helper_smp_mb(void)
+__rust_helper void rust_helper_smp_mb(void)
 {
 	smp_mb();
 }
 
-void rust_helper_smp_wmb(void)
+__rust_helper void rust_helper_smp_wmb(void)
 {
 	smp_wmb();
 }
 
-void rust_helper_smp_rmb(void)
+__rust_helper void rust_helper_smp_rmb(void)
 {
 	smp_rmb();
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 03/46] rust: binder: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
  2025-12-02 19:37 ` [PATCH 01/46] rust: auxiliary: add __rust_helper to helpers Alice Ryhl
  2025-12-02 19:37 ` [PATCH 02/46] rust: barrier: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 04/46] rust: bitmap: " Alice Ryhl
                   ` (45 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Greg Kroah-Hartman, Carlos Llamas

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Carlos Llamas <cmllamas@google.com>
---
 rust/helpers/binder.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/rust/helpers/binder.c b/rust/helpers/binder.c
index 224d38a92f1d985d78767d5a72f5ff60765b8508..a2327f1b3c9443df0ecd33275f98d4719f0ab8f1 100644
--- a/rust/helpers/binder.c
+++ b/rust/helpers/binder.c
@@ -7,20 +7,21 @@
 #include <linux/list_lru.h>
 #include <linux/task_work.h>
 
-unsigned long rust_helper_list_lru_count(struct list_lru *lru)
+__rust_helper unsigned long rust_helper_list_lru_count(struct list_lru *lru)
 {
 	return list_lru_count(lru);
 }
 
-unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
-					list_lru_walk_cb isolate, void *cb_arg,
-					unsigned long nr_to_walk)
+__rust_helper unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
+						      list_lru_walk_cb isolate,
+						      void *cb_arg,
+						      unsigned long nr_to_walk)
 {
 	return list_lru_walk(lru, isolate, cb_arg, nr_to_walk);
 }
 
-void rust_helper_init_task_work(struct callback_head *twork,
-				task_work_func_t func)
+__rust_helper void rust_helper_init_task_work(struct callback_head *twork,
+					      task_work_func_t func)
 {
 	init_task_work(twork, func);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 04/46] rust: bitmap: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (2 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 03/46] rust: binder: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 05/46] rust: bitops: " Alice Ryhl
                   ` (44 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Yury Norov

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Yury Norov <yury.norov@gmail.com>
---
 rust/helpers/bitmap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/bitmap.c b/rust/helpers/bitmap.c
index a50e2f082e47ad1bacbf453fd79d1fdfe2cc11f5..57e9e64ab0c385cbaec8ba3f169bc304e07cf419 100644
--- a/rust/helpers/bitmap.c
+++ b/rust/helpers/bitmap.c
@@ -2,8 +2,10 @@
 
 #include <linux/bitmap.h>
 
-void rust_helper_bitmap_copy_and_extend(unsigned long *to, const unsigned long *from,
-		unsigned int count, unsigned int size)
+__rust_helper void rust_helper_bitmap_copy_and_extend(unsigned long *to,
+						      const unsigned long *from,
+						      unsigned int count,
+						      unsigned int size)
 {
 	bitmap_copy_and_extend(to, from, count, size);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 05/46] rust: bitops: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (3 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 04/46] rust: bitmap: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 06/46] rust: blk: " Alice Ryhl
                   ` (43 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Yury Norov

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Yury Norov <yury.norov@gmail.com>
---
 rust/helpers/bitops.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c
index 5d0861d29d3f0d705a014ae4601685828405f33b..85be08b50a7c39e0627e4a2bbeaec110bf591ee5 100644
--- a/rust/helpers/bitops.c
+++ b/rust/helpers/bitops.c
@@ -2,22 +2,25 @@
 
 #include <linux/bitops.h>
 
-void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
+__rust_helper void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
 {
 	__set_bit(nr, addr);
 }
 
-void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
+__rust_helper void rust_helper___clear_bit(unsigned long nr,
+					   unsigned long *addr)
 {
 	__clear_bit(nr, addr);
 }
 
-void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
+__rust_helper void rust_helper_set_bit(unsigned long nr,
+				       volatile unsigned long *addr)
 {
 	set_bit(nr, addr);
 }
 
-void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
+__rust_helper void rust_helper_clear_bit(unsigned long nr,
+					 volatile unsigned long *addr)
 {
 	clear_bit(nr, addr);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 06/46] rust: blk: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (4 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 05/46] rust: bitops: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 07/46] rust: bug: " Alice Ryhl
                   ` (42 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Andreas Hindborg, Boqun Feng,
	linux-block

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: linux-block@vger.kernel.org
---
 rust/helpers/blk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/blk.c b/rust/helpers/blk.c
index cc9f4e6a2d2346eb2814104cce706755ba135e06..20c512e46a7a5fd126d092a5b9f8742a1deac9ff 100644
--- a/rust/helpers/blk.c
+++ b/rust/helpers/blk.c
@@ -3,12 +3,12 @@
 #include <linux/blk-mq.h>
 #include <linux/blkdev.h>
 
-void *rust_helper_blk_mq_rq_to_pdu(struct request *rq)
+__rust_helper void *rust_helper_blk_mq_rq_to_pdu(struct request *rq)
 {
 	return blk_mq_rq_to_pdu(rq);
 }
 
-struct request *rust_helper_blk_mq_rq_from_pdu(void *pdu)
+__rust_helper struct request *rust_helper_blk_mq_rq_from_pdu(void *pdu)
 {
 	return blk_mq_rq_from_pdu(pdu);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 07/46] rust: bug: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (5 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 06/46] rust: blk: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 08/46] rust: clk: " Alice Ryhl
                   ` (41 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, FUJITA Tomonori, Miguel Ojeda

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
---
 rust/helpers/bug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/bug.c b/rust/helpers/bug.c
index a62c96f507d1c16cacc462199e390857b8afec28..b51e607725785f540dc46156630ca848dd0de491 100644
--- a/rust/helpers/bug.c
+++ b/rust/helpers/bug.c
@@ -2,12 +2,12 @@
 
 #include <linux/bug.h>
 
-__noreturn void rust_helper_BUG(void)
+__rust_helper __noreturn void rust_helper_BUG(void)
 {
 	BUG();
 }
 
-bool rust_helper_WARN_ON(bool cond)
+__rust_helper bool rust_helper_WARN_ON(bool cond)
 {
 	return WARN_ON(cond);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 08/46] rust: clk: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (6 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 07/46] rust: bug: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 09/46] rust: completion: " Alice Ryhl
                   ` (40 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Michael Turquette, Stephen Boyd,
	linux-clk

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
---
 rust/helpers/clk.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/rust/helpers/clk.c b/rust/helpers/clk.c
index 6d04372c9f3bbc4355c86eda5b1ebd7576d26442..15fd7e469cddf2e10d9e996c5055c7afb219e68c 100644
--- a/rust/helpers/clk.c
+++ b/rust/helpers/clk.c
@@ -7,60 +7,62 @@
  * CONFIG_HAVE_CLK or CONFIG_HAVE_CLK_PREPARE aren't set.
  */
 #ifndef CONFIG_HAVE_CLK
-struct clk *rust_helper_clk_get(struct device *dev, const char *id)
+__rust_helper struct clk *rust_helper_clk_get(struct device *dev,
+					      const char *id)
 {
 	return clk_get(dev, id);
 }
 
-void rust_helper_clk_put(struct clk *clk)
+__rust_helper void rust_helper_clk_put(struct clk *clk)
 {
 	clk_put(clk);
 }
 
-int rust_helper_clk_enable(struct clk *clk)
+__rust_helper int rust_helper_clk_enable(struct clk *clk)
 {
 	return clk_enable(clk);
 }
 
-void rust_helper_clk_disable(struct clk *clk)
+__rust_helper void rust_helper_clk_disable(struct clk *clk)
 {
 	clk_disable(clk);
 }
 
-unsigned long rust_helper_clk_get_rate(struct clk *clk)
+__rust_helper unsigned long rust_helper_clk_get_rate(struct clk *clk)
 {
 	return clk_get_rate(clk);
 }
 
-int rust_helper_clk_set_rate(struct clk *clk, unsigned long rate)
+__rust_helper int rust_helper_clk_set_rate(struct clk *clk, unsigned long rate)
 {
 	return clk_set_rate(clk, rate);
 }
 #endif
 
 #ifndef CONFIG_HAVE_CLK_PREPARE
-int rust_helper_clk_prepare(struct clk *clk)
+__rust_helper int rust_helper_clk_prepare(struct clk *clk)
 {
 	return clk_prepare(clk);
 }
 
-void rust_helper_clk_unprepare(struct clk *clk)
+__rust_helper void rust_helper_clk_unprepare(struct clk *clk)
 {
 	clk_unprepare(clk);
 }
 #endif
 
-struct clk *rust_helper_clk_get_optional(struct device *dev, const char *id)
+__rust_helper struct clk *rust_helper_clk_get_optional(struct device *dev,
+						       const char *id)
 {
 	return clk_get_optional(dev, id);
 }
 
-int rust_helper_clk_prepare_enable(struct clk *clk)
+__rust_helper int rust_helper_clk_prepare_enable(struct clk *clk)
 {
 	return clk_prepare_enable(clk);
 }
 
-void rust_helper_clk_disable_unprepare(struct clk *clk)
+__rust_helper void rust_helper_clk_disable_unprepare(struct clk *clk)
 {
 	clk_disable_unprepare(clk);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 09/46] rust: completion: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (7 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 08/46] rust: clk: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 10/46] rust: cpu: " Alice Ryhl
                   ` (39 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Benno Lossin, Danilo Krummrich,
	Boqun Feng, Miguel Ojeda

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Benno Lossin <lossin@kernel.org>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
---
 rust/helpers/completion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/completion.c b/rust/helpers/completion.c
index b2443262a2aed30db0084efa00b140d4d5929bf0..0126767cc3bebd56db706048b8bc07c6788de5e2 100644
--- a/rust/helpers/completion.c
+++ b/rust/helpers/completion.c
@@ -2,7 +2,7 @@
 
 #include <linux/completion.h>
 
-void rust_helper_init_completion(struct completion *x)
+__rust_helper void rust_helper_init_completion(struct completion *x)
 {
 	init_completion(x);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 10/46] rust: cpu: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (8 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 09/46] rust: completion: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 11/46] rust: cpufreq: " Alice Ryhl
                   ` (38 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Thomas Gleixner, Peter Zijlstra

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 rust/helpers/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/cpu.c b/rust/helpers/cpu.c
index 824e0adb19d4c988a6d5974f3ed94e6708dd534f..5759349b2c88b483f445ea03ed92d174e16b5959 100644
--- a/rust/helpers/cpu.c
+++ b/rust/helpers/cpu.c
@@ -2,7 +2,7 @@
 
 #include <linux/smp.h>
 
-unsigned int rust_helper_raw_smp_processor_id(void)
+__rust_helper unsigned int rust_helper_raw_smp_processor_id(void)
 {
 	return raw_smp_processor_id();
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 11/46] rust: cpufreq: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (9 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 10/46] rust: cpu: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-03  5:48   ` Viresh Kumar
  2025-12-02 19:37 ` [PATCH 12/46] rust: cpumask: " Alice Ryhl
                   ` (37 subsequent siblings)
  48 siblings, 1 reply; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Rafael J. Wysocki, Viresh Kumar,
	linux-pm

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
---
 rust/helpers/cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/helpers/cpufreq.c b/rust/helpers/cpufreq.c
index 7c1343c4d65eaff6f62255b6c9a9a67f89af1541..0e16aeef2b5a696bf8974f37d9e5e3c24d999f40 100644
--- a/rust/helpers/cpufreq.c
+++ b/rust/helpers/cpufreq.c
@@ -3,7 +3,8 @@
 #include <linux/cpufreq.h>
 
 #ifdef CONFIG_CPU_FREQ
-void rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy)
+__rust_helper void
+rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy)
 {
 	cpufreq_register_em_with_opp(policy);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 12/46] rust: cpumask: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (10 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 11/46] rust: cpufreq: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 13/46] rust: cred: " Alice Ryhl
                   ` (36 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Yury Norov

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Yury Norov <yury.norov@gmail.com>
---
 rust/helpers/cpumask.c | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c
index eb10598a0242f31598d0c401e194dce194ac85bf..74b561f7bf6f112c22e6a3ddb266ac003b06f531 100644
--- a/rust/helpers/cpumask.c
+++ b/rust/helpers/cpumask.c
@@ -2,68 +2,74 @@
 
 #include <linux/cpumask.h>
 
-void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
+__rust_helper void rust_helper_cpumask_set_cpu(unsigned int cpu,
+					       struct cpumask *dstp)
 {
 	cpumask_set_cpu(cpu, dstp);
 }
 
-void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
+__rust_helper void rust_helper___cpumask_set_cpu(unsigned int cpu,
+						 struct cpumask *dstp)
 {
 	__cpumask_set_cpu(cpu, dstp);
 }
 
-void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
+__rust_helper void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
 {
 	cpumask_clear_cpu(cpu, dstp);
 }
 
-void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp)
+__rust_helper void rust_helper___cpumask_clear_cpu(int cpu,
+						   struct cpumask *dstp)
 {
 	__cpumask_clear_cpu(cpu, dstp);
 }
 
-bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp)
+__rust_helper bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp)
 {
 	return cpumask_test_cpu(cpu, srcp);
 }
 
-void rust_helper_cpumask_setall(struct cpumask *dstp)
+__rust_helper void rust_helper_cpumask_setall(struct cpumask *dstp)
 {
 	cpumask_setall(dstp);
 }
 
-bool rust_helper_cpumask_empty(struct cpumask *srcp)
+__rust_helper bool rust_helper_cpumask_empty(struct cpumask *srcp)
 {
 	return cpumask_empty(srcp);
 }
 
-bool rust_helper_cpumask_full(struct cpumask *srcp)
+__rust_helper bool rust_helper_cpumask_full(struct cpumask *srcp)
 {
 	return cpumask_full(srcp);
 }
 
-unsigned int rust_helper_cpumask_weight(struct cpumask *srcp)
+__rust_helper unsigned int rust_helper_cpumask_weight(struct cpumask *srcp)
 {
 	return cpumask_weight(srcp);
 }
 
-void rust_helper_cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp)
+__rust_helper void rust_helper_cpumask_copy(struct cpumask *dstp,
+					    const struct cpumask *srcp)
 {
 	cpumask_copy(dstp, srcp);
 }
 
-bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
+__rust_helper bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask,
+						 gfp_t flags)
 {
 	return alloc_cpumask_var(mask, flags);
 }
 
-bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
+__rust_helper bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask,
+						  gfp_t flags)
 {
 	return zalloc_cpumask_var(mask, flags);
 }
 
 #ifndef CONFIG_CPUMASK_OFFSTACK
-void rust_helper_free_cpumask_var(cpumask_var_t mask)
+__rust_helper void rust_helper_free_cpumask_var(cpumask_var_t mask)
 {
 	free_cpumask_var(mask);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 13/46] rust: cred: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (11 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 12/46] rust: cpumask: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 14/46] rust: device: " Alice Ryhl
                   ` (35 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Paul Moore, Serge Hallyn,
	linux-security-module

This is needed to inline these helpers into Rust code.

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.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 14/46] rust: device: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (12 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 13/46] rust: cred: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 15/46] rust: dma: " Alice Ryhl
                   ` (34 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Daniel Almeida,
	Benno Lossin, Greg Kroah-Hartman, Viresh Kumar

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Benno Lossin <lossin@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
---
 rust/helpers/device.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/rust/helpers/device.c b/rust/helpers/device.c
index 9a4316bafedfbc4015446ce1945f1bf1ae7face1..a8ab931a9bd1233c613a9127fbb3a93a3bab7951 100644
--- a/rust/helpers/device.c
+++ b/rust/helpers/device.c
@@ -2,26 +2,26 @@
 
 #include <linux/device.h>
 
-int rust_helper_devm_add_action(struct device *dev,
-				void (*action)(void *),
-				void *data)
+__rust_helper int rust_helper_devm_add_action(struct device *dev,
+					      void (*action)(void *),
+					      void *data)
 {
 	return devm_add_action(dev, action, data);
 }
 
-int rust_helper_devm_add_action_or_reset(struct device *dev,
-					 void (*action)(void *),
-					 void *data)
+__rust_helper int rust_helper_devm_add_action_or_reset(struct device *dev,
+						       void (*action)(void *),
+						       void *data)
 {
 	return devm_add_action_or_reset(dev, action, data);
 }
 
-void *rust_helper_dev_get_drvdata(const struct device *dev)
+__rust_helper void *rust_helper_dev_get_drvdata(const struct device *dev)
 {
 	return dev_get_drvdata(dev);
 }
 
-void rust_helper_dev_set_drvdata(struct device *dev, void *data)
+__rust_helper void rust_helper_dev_set_drvdata(struct device *dev, void *data)
 {
 	dev_set_drvdata(dev, data);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 15/46] rust: dma: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (13 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 14/46] rust: device: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 16/46] rust: drm: " Alice Ryhl
                   ` (33 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Abdiel Janulgue,
	Daniel Almeida, Robin Murphy, Andreas Hindborg

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Abdiel Janulgue <abdiel.janulgue@gmail.com>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
---
 rust/helpers/dma.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/rust/helpers/dma.c b/rust/helpers/dma.c
index 6e741c197242572844fe550de4ddcd93520cbb42..8c7e8d7b888e3fe456b50cbb2a75306cc2a6cc2a 100644
--- a/rust/helpers/dma.c
+++ b/rust/helpers/dma.c
@@ -2,20 +2,23 @@
 
 #include <linux/dma-mapping.h>
 
-void *rust_helper_dma_alloc_attrs(struct device *dev, size_t size,
-				  dma_addr_t *dma_handle, gfp_t flag,
-				  unsigned long attrs)
+__rust_helper void *rust_helper_dma_alloc_attrs(struct device *dev, size_t size,
+						dma_addr_t *dma_handle,
+						gfp_t flag, unsigned long attrs)
 {
 	return dma_alloc_attrs(dev, size, dma_handle, flag, attrs);
 }
 
-void rust_helper_dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
-				dma_addr_t dma_handle, unsigned long attrs)
+__rust_helper void rust_helper_dma_free_attrs(struct device *dev, size_t size,
+					      void *cpu_addr,
+					      dma_addr_t dma_handle,
+					      unsigned long attrs)
 {
 	dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs);
 }
 
-int rust_helper_dma_set_mask_and_coherent(struct device *dev, u64 mask)
+__rust_helper int rust_helper_dma_set_mask_and_coherent(struct device *dev,
+							u64 mask)
 {
 	return dma_set_mask_and_coherent(dev, mask);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 16/46] rust: drm: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (14 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 15/46] rust: dma: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 17/46] rust: err: " Alice Ryhl
                   ` (32 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Lyude Paul

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Lyude Paul <lyude@redhat.com>
---
 rust/helpers/drm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/rust/helpers/drm.c b/rust/helpers/drm.c
index 450b406c6f27390084e041f9bcc527fe3ce429b6..fe226f7b53ef0c02e6b715e53e01e76bca9bea56 100644
--- a/rust/helpers/drm.c
+++ b/rust/helpers/drm.c
@@ -5,17 +5,18 @@
 
 #ifdef CONFIG_DRM
 
-void rust_helper_drm_gem_object_get(struct drm_gem_object *obj)
+__rust_helper void rust_helper_drm_gem_object_get(struct drm_gem_object *obj)
 {
 	drm_gem_object_get(obj);
 }
 
-void rust_helper_drm_gem_object_put(struct drm_gem_object *obj)
+__rust_helper void rust_helper_drm_gem_object_put(struct drm_gem_object *obj)
 {
 	drm_gem_object_put(obj);
 }
 
-__u64 rust_helper_drm_vma_node_offset_addr(struct drm_vma_offset_node *node)
+__rust_helper __u64
+rust_helper_drm_vma_node_offset_addr(struct drm_vma_offset_node *node)
 {
 	return drm_vma_node_offset_addr(node);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 17/46] rust: err: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (15 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 16/46] rust: drm: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 18/46] rust: fs: " Alice Ryhl
                   ` (31 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 rust/helpers/build_bug.c | 2 +-
 rust/helpers/err.c       | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rust/helpers/build_bug.c b/rust/helpers/build_bug.c
index 44e5794880373e5b4c3e9de5677d8e03ccd4a2be..14dbc55bb539589fd822ac8777b3fdaccfee7897 100644
--- a/rust/helpers/build_bug.c
+++ b/rust/helpers/build_bug.c
@@ -2,7 +2,7 @@
 
 #include <linux/errname.h>
 
-const char *rust_helper_errname(int err)
+__rust_helper const char *rust_helper_errname(int err)
 {
 	return errname(err);
 }
diff --git a/rust/helpers/err.c b/rust/helpers/err.c
index 544c7cb8663283edbe202318e5bca870708546f3..2872158e379383d592af687991115a0d223c3898 100644
--- a/rust/helpers/err.c
+++ b/rust/helpers/err.c
@@ -2,17 +2,17 @@
 
 #include <linux/err.h>
 
-__force void *rust_helper_ERR_PTR(long err)
+__rust_helper __force void *rust_helper_ERR_PTR(long err)
 {
 	return ERR_PTR(err);
 }
 
-bool rust_helper_IS_ERR(__force const void *ptr)
+__rust_helper bool rust_helper_IS_ERR(__force const void *ptr)
 {
 	return IS_ERR(ptr);
 }
 
-long rust_helper_PTR_ERR(__force const void *ptr)
+__rust_helper long rust_helper_PTR_ERR(__force const void *ptr)
 {
 	return PTR_ERR(ptr);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 18/46] rust: fs: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (16 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 17/46] rust: err: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 19/46] rust: io: " Alice Ryhl
                   ` (30 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Alexander Viro, Christian Brauner,
	Jan Kara, linux-fsdevel

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
---
 rust/helpers/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/fs.c b/rust/helpers/fs.c
index a75c9676337246ce532ef694e64ba9a7d7ad5842..789d60fb8908b99d5c50293cb7a3ec6c61e768f1 100644
--- a/rust/helpers/fs.c
+++ b/rust/helpers/fs.c
@@ -6,7 +6,7 @@
 
 #include <linux/fs.h>
 
-struct file *rust_helper_get_file(struct file *f)
+__rust_helper struct file *rust_helper_get_file(struct file *f)
 {
 	return get_file(f);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 19/46] rust: io: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (17 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 18/46] rust: fs: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 20/46] rust: irq: " Alice Ryhl
                   ` (29 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Daniel Almeida,
	Miguel Ojeda, Greg Kroah-Hartman, FUJITA Tomonori

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
 rust/helpers/io.c | 64 +++++++++++++++++++++++++++++--------------------------
 1 file changed, 34 insertions(+), 30 deletions(-)

diff --git a/rust/helpers/io.c b/rust/helpers/io.c
index c475913c69e647b1042e8e7d66b9148d892947a1..397810864a243958b23c0a6f530e2705ca5e909c 100644
--- a/rust/helpers/io.c
+++ b/rust/helpers/io.c
@@ -3,140 +3,144 @@
 #include <linux/io.h>
 #include <linux/ioport.h>
 
-void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size)
+__rust_helper void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size)
 {
 	return ioremap(offset, size);
 }
 
-void __iomem *rust_helper_ioremap_np(phys_addr_t offset, size_t size)
+__rust_helper void __iomem *rust_helper_ioremap_np(phys_addr_t offset,
+						   size_t size)
 {
 	return ioremap_np(offset, size);
 }
 
-void rust_helper_iounmap(void __iomem *addr)
+__rust_helper void rust_helper_iounmap(void __iomem *addr)
 {
 	iounmap(addr);
 }
 
-u8 rust_helper_readb(const void __iomem *addr)
+__rust_helper u8 rust_helper_readb(const void __iomem *addr)
 {
 	return readb(addr);
 }
 
-u16 rust_helper_readw(const void __iomem *addr)
+__rust_helper u16 rust_helper_readw(const void __iomem *addr)
 {
 	return readw(addr);
 }
 
-u32 rust_helper_readl(const void __iomem *addr)
+__rust_helper u32 rust_helper_readl(const void __iomem *addr)
 {
 	return readl(addr);
 }
 
 #ifdef CONFIG_64BIT
-u64 rust_helper_readq(const void __iomem *addr)
+__rust_helper u64 rust_helper_readq(const void __iomem *addr)
 {
 	return readq(addr);
 }
 #endif
 
-void rust_helper_writeb(u8 value, void __iomem *addr)
+__rust_helper void rust_helper_writeb(u8 value, void __iomem *addr)
 {
 	writeb(value, addr);
 }
 
-void rust_helper_writew(u16 value, void __iomem *addr)
+__rust_helper void rust_helper_writew(u16 value, void __iomem *addr)
 {
 	writew(value, addr);
 }
 
-void rust_helper_writel(u32 value, void __iomem *addr)
+__rust_helper void rust_helper_writel(u32 value, void __iomem *addr)
 {
 	writel(value, addr);
 }
 
 #ifdef CONFIG_64BIT
-void rust_helper_writeq(u64 value, void __iomem *addr)
+__rust_helper void rust_helper_writeq(u64 value, void __iomem *addr)
 {
 	writeq(value, addr);
 }
 #endif
 
-u8 rust_helper_readb_relaxed(const void __iomem *addr)
+__rust_helper u8 rust_helper_readb_relaxed(const void __iomem *addr)
 {
 	return readb_relaxed(addr);
 }
 
-u16 rust_helper_readw_relaxed(const void __iomem *addr)
+__rust_helper u16 rust_helper_readw_relaxed(const void __iomem *addr)
 {
 	return readw_relaxed(addr);
 }
 
-u32 rust_helper_readl_relaxed(const void __iomem *addr)
+__rust_helper u32 rust_helper_readl_relaxed(const void __iomem *addr)
 {
 	return readl_relaxed(addr);
 }
 
 #ifdef CONFIG_64BIT
-u64 rust_helper_readq_relaxed(const void __iomem *addr)
+__rust_helper u64 rust_helper_readq_relaxed(const void __iomem *addr)
 {
 	return readq_relaxed(addr);
 }
 #endif
 
-void rust_helper_writeb_relaxed(u8 value, void __iomem *addr)
+__rust_helper void rust_helper_writeb_relaxed(u8 value, void __iomem *addr)
 {
 	writeb_relaxed(value, addr);
 }
 
-void rust_helper_writew_relaxed(u16 value, void __iomem *addr)
+__rust_helper void rust_helper_writew_relaxed(u16 value, void __iomem *addr)
 {
 	writew_relaxed(value, addr);
 }
 
-void rust_helper_writel_relaxed(u32 value, void __iomem *addr)
+__rust_helper void rust_helper_writel_relaxed(u32 value, void __iomem *addr)
 {
 	writel_relaxed(value, addr);
 }
 
 #ifdef CONFIG_64BIT
-void rust_helper_writeq_relaxed(u64 value, void __iomem *addr)
+__rust_helper void rust_helper_writeq_relaxed(u64 value, void __iomem *addr)
 {
 	writeq_relaxed(value, addr);
 }
 #endif
 
-resource_size_t rust_helper_resource_size(struct resource *res)
+__rust_helper resource_size_t rust_helper_resource_size(struct resource *res)
 {
 	return resource_size(res);
 }
 
-struct resource *rust_helper_request_mem_region(resource_size_t start,
-						resource_size_t n,
-						const char *name)
+__rust_helper struct resource *
+rust_helper_request_mem_region(resource_size_t start, resource_size_t n,
+			       const char *name)
 {
 	return request_mem_region(start, n, name);
 }
 
-void rust_helper_release_mem_region(resource_size_t start, resource_size_t n)
+__rust_helper void rust_helper_release_mem_region(resource_size_t start,
+						  resource_size_t n)
 {
 	release_mem_region(start, n);
 }
 
-struct resource *rust_helper_request_region(resource_size_t start,
-					    resource_size_t n, const char *name)
+__rust_helper struct resource *rust_helper_request_region(resource_size_t start,
+							  resource_size_t n,
+							  const char *name)
 {
 	return request_region(start, n, name);
 }
 
-struct resource *rust_helper_request_muxed_region(resource_size_t start,
-						  resource_size_t n,
-						  const char *name)
+__rust_helper struct resource *
+rust_helper_request_muxed_region(resource_size_t start, resource_size_t n,
+				 const char *name)
 {
 	return request_muxed_region(start, n, name);
 }
 
-void rust_helper_release_region(resource_size_t start, resource_size_t n)
+__rust_helper void rust_helper_release_region(resource_size_t start,
+					      resource_size_t n)
 {
 	release_region(start, n);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 20/46] rust: irq: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (18 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 19/46] rust: io: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 21/46] rust: jump_label: " Alice Ryhl
                   ` (28 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Daniel Almeida

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
---
 rust/helpers/irq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/irq.c b/rust/helpers/irq.c
index 1faca428e2c047a656dec3171855c1508d67e60b..a61fad33386621e8830319b92ee24b92fe7576f2 100644
--- a/rust/helpers/irq.c
+++ b/rust/helpers/irq.c
@@ -2,8 +2,10 @@
 
 #include <linux/interrupt.h>
 
-int rust_helper_request_irq(unsigned int irq, irq_handler_t handler,
-			    unsigned long flags, const char *name, void *dev)
+__rust_helper int rust_helper_request_irq(unsigned int irq,
+					  irq_handler_t handler,
+					  unsigned long flags, const char *name,
+					  void *dev)
 {
 	return request_irq(irq, handler, flags, name, dev);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 21/46] rust: jump_label: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (19 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 20/46] rust: irq: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 22/46] rust: kunit: " Alice Ryhl
                   ` (27 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Peter Zijlstra, Josh Poimboeuf,
	Jason Baron, Steven Rostedt, Ard Biesheuvel

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
---
 rust/helpers/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/jump_label.c b/rust/helpers/jump_label.c
index fc1f1e0df08e79c0f06ac46cb6729a08deb7bd41..7ca384e73121820d882fde645a80cf718e6d9fbd 100644
--- a/rust/helpers/jump_label.c
+++ b/rust/helpers/jump_label.c
@@ -7,7 +7,7 @@
 #include <linux/jump_label.h>
 
 #ifndef CONFIG_JUMP_LABEL
-int rust_helper_static_key_count(struct static_key *key)
+__rust_helper int rust_helper_static_key_count(struct static_key *key)
 {
 	return static_key_count(key);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 22/46] rust: kunit: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (20 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 21/46] rust: jump_label: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 23/46] rust: maple_tree: " Alice Ryhl
                   ` (26 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Brendan Higgins, David Gow, Rae Moar,
	linux-kselftest

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <rmoar@google.com>
Cc: linux-kselftest@vger.kernel.org
---
 rust/helpers/kunit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/kunit.c b/rust/helpers/kunit.c
index b85a4d394c118906d35ffef85221cf1a8b3c6fe3..cafb94b6776c07fe505e1749de71f91125006131 100644
--- a/rust/helpers/kunit.c
+++ b/rust/helpers/kunit.c
@@ -2,7 +2,7 @@
 
 #include <kunit/test-bug.h>
 
-struct kunit *rust_helper_kunit_get_current_test(void)
+__rust_helper struct kunit *rust_helper_kunit_get_current_test(void)
 {
 	return kunit_get_current_test();
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 23/46] rust: maple_tree: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (21 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 22/46] rust: kunit: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-04 21:07   ` Andrew Ballance
  2025-12-02 19:37 ` [PATCH 24/46] rust: mm: " Alice Ryhl
                   ` (25 subsequent siblings)
  48 siblings, 1 reply; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Andrew Morton, Liam R. Howlett,
	Andrew Ballance, maple-tree, linux-mm

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Andrew Ballance <andrewjballance@gmail.com>
Cc: maple-tree@lists.infradead.org
Cc: linux-mm@kvack.org
---
 rust/helpers/maple_tree.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/helpers/maple_tree.c b/rust/helpers/maple_tree.c
index 1dd9ac84a13feed53c0ed5eec6805517081d0673..5586486a76e0de60969af1510b4b0428392920e6 100644
--- a/rust/helpers/maple_tree.c
+++ b/rust/helpers/maple_tree.c
@@ -2,7 +2,8 @@
 
 #include <linux/maple_tree.h>
 
-void rust_helper_mt_init_flags(struct maple_tree *mt, unsigned int flags)
+__rust_helper void rust_helper_mt_init_flags(struct maple_tree *mt,
+					     unsigned int flags)
 {
 	mt_init_flags(mt, flags);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 24/46] rust: mm: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (22 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 23/46] rust: maple_tree: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-03  1:43   ` Boqun Feng
  2025-12-02 19:37 ` [PATCH 25/46] rust: of: " Alice Ryhl
                   ` (24 subsequent siblings)
  48 siblings, 1 reply; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Andrew Morton, Lorenzo Stoakes,
	Liam R. Howlett, Uladzislau Rezki, Vitaly Wool, linux-mm

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.se>
Cc: linux-mm@kvack.org
---
 rust/helpers/mm.c      | 20 ++++++++++----------
 rust/helpers/page.c    |  9 +++++----
 rust/helpers/vmalloc.c |  7 ++++---
 3 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/rust/helpers/mm.c b/rust/helpers/mm.c
index 81b510c96fd2692dcb7ab4705f790bd3a41a630e..b5540997bd20d4398e2838956ed70b2fb61c5661 100644
--- a/rust/helpers/mm.c
+++ b/rust/helpers/mm.c
@@ -3,48 +3,48 @@
 #include <linux/mm.h>
 #include <linux/sched/mm.h>
 
-void rust_helper_mmgrab(struct mm_struct *mm)
+__rust_helper void rust_helper_mmgrab(struct mm_struct *mm)
 {
 	mmgrab(mm);
 }
 
-void rust_helper_mmdrop(struct mm_struct *mm)
+__rust_helper void rust_helper_mmdrop(struct mm_struct *mm)
 {
 	mmdrop(mm);
 }
 
-void rust_helper_mmget(struct mm_struct *mm)
+__rust_helper void rust_helper_mmget(struct mm_struct *mm)
 {
 	mmget(mm);
 }
 
-bool rust_helper_mmget_not_zero(struct mm_struct *mm)
+__rust_helper bool rust_helper_mmget_not_zero(struct mm_struct *mm)
 {
 	return mmget_not_zero(mm);
 }
 
-void rust_helper_mmap_read_lock(struct mm_struct *mm)
+__rust_helper void rust_helper_mmap_read_lock(struct mm_struct *mm)
 {
 	mmap_read_lock(mm);
 }
 
-bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
+__rust_helper bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
 {
 	return mmap_read_trylock(mm);
 }
 
-void rust_helper_mmap_read_unlock(struct mm_struct *mm)
+__rust_helper void rust_helper_mmap_read_unlock(struct mm_struct *mm)
 {
 	mmap_read_unlock(mm);
 }
 
-struct vm_area_struct *rust_helper_vma_lookup(struct mm_struct *mm,
-					      unsigned long addr)
+__rust_helper struct vm_area_struct *
+rust_helper_vma_lookup(struct mm_struct *mm, unsigned long addr)
 {
 	return vma_lookup(mm, addr);
 }
 
-void rust_helper_vma_end_read(struct vm_area_struct *vma)
+__rust_helper void rust_helper_vma_end_read(struct vm_area_struct *vma)
 {
 	vma_end_read(vma);
 }
diff --git a/rust/helpers/page.c b/rust/helpers/page.c
index 7144de5a61dbdb3006a668961cd1b09440e74908..f8463fbed2a2670ddfd4c23dc922b46b0913c3a2 100644
--- a/rust/helpers/page.c
+++ b/rust/helpers/page.c
@@ -4,23 +4,24 @@
 #include <linux/highmem.h>
 #include <linux/mm.h>
 
-struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
+__rust_helper struct page *rust_helper_alloc_pages(gfp_t gfp_mask,
+						   unsigned int order)
 {
 	return alloc_pages(gfp_mask, order);
 }
 
-void *rust_helper_kmap_local_page(struct page *page)
+__rust_helper void *rust_helper_kmap_local_page(struct page *page)
 {
 	return kmap_local_page(page);
 }
 
-void rust_helper_kunmap_local(const void *addr)
+__rust_helper void rust_helper_kunmap_local(const void *addr)
 {
 	kunmap_local(addr);
 }
 
 #ifndef NODE_NOT_IN_PAGE_FLAGS
-int rust_helper_page_to_nid(const struct page *page)
+__rust_helper int rust_helper_page_to_nid(const struct page *page)
 {
 	return page_to_nid(page);
 }
diff --git a/rust/helpers/vmalloc.c b/rust/helpers/vmalloc.c
index 7d7f7336b3d2f5a32e6a2b6cf8407da37775cfd9..469ebf2f41c94744e2a2719d7c0eb7d4d7dc58ff 100644
--- a/rust/helpers/vmalloc.c
+++ b/rust/helpers/vmalloc.c
@@ -2,9 +2,10 @@
 
 #include <linux/vmalloc.h>
 
-void * __must_check __realloc_size(2)
-rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
-				gfp_t flags, int node)
+__rust_helper void *__must_check __realloc_size(2)
+	rust_helper_vrealloc_node_align(const void *p, size_t size,
+					unsigned long align, gfp_t flags,
+					int node)
 {
 	return vrealloc_node_align(p, size, align, flags, node);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 25/46] rust: of: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (23 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 24/46] rust: mm: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 26/46] rust: pci: " Alice Ryhl
                   ` (23 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Rob Herring, Saravana Kannan,
	devicetree

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Rob Herring <robh@kernel.org>
Cc: Saravana Kannan <saravanak@google.com>
Cc: devicetree@vger.kernel.org
---
 rust/helpers/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/of.c b/rust/helpers/of.c
index 86b51167c913f96b626e55adb51bdac2a9f04f56..8f62ca69e8ba54098343dcef77f5e82e5a3bf497 100644
--- a/rust/helpers/of.c
+++ b/rust/helpers/of.c
@@ -2,7 +2,7 @@
 
 #include <linux/of.h>
 
-bool rust_helper_is_of_node(const struct fwnode_handle *fwnode)
+__rust_helper bool rust_helper_is_of_node(const struct fwnode_handle *fwnode)
 {
 	return is_of_node(fwnode);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 26/46] rust: pci: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (24 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 25/46] rust: of: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 27/46] rust: pid_namespace: " Alice Ryhl
                   ` (22 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Bjorn Helgaas,
	Krzysztof Wilczyński, linux-pci

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
Cc: linux-pci@vger.kernel.org
---
 rust/helpers/pci.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/rust/helpers/pci.c b/rust/helpers/pci.c
index fb814572b23631c255eadeebccca353ab0dd3076..4b77a73ecda1ab71a7fba8b56a7a133d8c77c690 100644
--- a/rust/helpers/pci.c
+++ b/rust/helpers/pci.c
@@ -2,28 +2,31 @@
 
 #include <linux/pci.h>
 
-u16 rust_helper_pci_dev_id(struct pci_dev *dev)
+__rust_helper u16 rust_helper_pci_dev_id(struct pci_dev *dev)
 {
 	return PCI_DEVID(dev->bus->number, dev->devfn);
 }
 
-resource_size_t rust_helper_pci_resource_start(struct pci_dev *pdev, int bar)
+__rust_helper resource_size_t
+rust_helper_pci_resource_start(struct pci_dev *pdev, int bar)
 {
 	return pci_resource_start(pdev, bar);
 }
 
-resource_size_t rust_helper_pci_resource_len(struct pci_dev *pdev, int bar)
+__rust_helper resource_size_t rust_helper_pci_resource_len(struct pci_dev *pdev,
+							   int bar)
 {
 	return pci_resource_len(pdev, bar);
 }
 
-bool rust_helper_dev_is_pci(const struct device *dev)
+__rust_helper bool rust_helper_dev_is_pci(const struct device *dev)
 {
 	return dev_is_pci(dev);
 }
 
 #ifndef CONFIG_PCI_MSI
-int rust_helper_pci_irq_vector(struct pci_dev *pdev, unsigned int nvec)
+__rust_helper int rust_helper_pci_irq_vector(struct pci_dev *pdev,
+					     unsigned int nvec)
 {
 	return pci_irq_vector(pdev, nvec);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 27/46] rust: pid_namespace: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (25 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 26/46] rust: pci: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 28/46] rust: platform: " Alice Ryhl
                   ` (21 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Christian Brauner

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Christian Brauner <brauner@kernel.org>
---
 rust/helpers/pid_namespace.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/rust/helpers/pid_namespace.c b/rust/helpers/pid_namespace.c
index f41482bdec9a7c4e84b81ec141027fbd65251230..f46ab779b5279f0912c7c7440885e1c006f5b875 100644
--- a/rust/helpers/pid_namespace.c
+++ b/rust/helpers/pid_namespace.c
@@ -3,18 +3,20 @@
 #include <linux/pid_namespace.h>
 #include <linux/cleanup.h>
 
-struct pid_namespace *rust_helper_get_pid_ns(struct pid_namespace *ns)
+__rust_helper struct pid_namespace *
+rust_helper_get_pid_ns(struct pid_namespace *ns)
 {
 	return get_pid_ns(ns);
 }
 
-void rust_helper_put_pid_ns(struct pid_namespace *ns)
+__rust_helper void rust_helper_put_pid_ns(struct pid_namespace *ns)
 {
 	put_pid_ns(ns);
 }
 
 /* Get a reference on a task's pid namespace. */
-struct pid_namespace *rust_helper_task_get_pid_ns(struct task_struct *task)
+__rust_helper struct pid_namespace *
+rust_helper_task_get_pid_ns(struct task_struct *task)
 {
 	struct pid_namespace *pid_ns;
 

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 28/46] rust: platform: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (26 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 27/46] rust: pid_namespace: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 29/46] rust: poll: " Alice Ryhl
                   ` (20 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Greg Kroah-Hartman,
	Benno Lossin, Rob Herring

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benno Lossin <lossin@kernel.org>
Cc: Rob Herring <robh@kernel.org>
---
 rust/helpers/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/platform.c b/rust/helpers/platform.c
index 1ce89c1a36f7913f6fb535f95e82c7a31782db0e..188b3240f32dc470dac8f5f25203ffa88c3544a7 100644
--- a/rust/helpers/platform.c
+++ b/rust/helpers/platform.c
@@ -2,7 +2,7 @@
 
 #include <linux/platform_device.h>
 
-bool rust_helper_dev_is_platform(const struct device *dev)
+__rust_helper bool rust_helper_dev_is_platform(const struct device *dev)
 {
 	return dev_is_platform(dev);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 29/46] rust: poll: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (27 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 28/46] rust: platform: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 30/46] rust: processor: " Alice Ryhl
                   ` (19 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Alexander Viro, Christian Brauner,
	Jan Kara, linux-fsdevel

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
---
 rust/helpers/poll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/poll.c b/rust/helpers/poll.c
index 7e5b1751c2d526f2dd467fcd61dcf49294d3c20d..78b3839b50f065a7604dd80bc0fdbb5d8c50b430 100644
--- a/rust/helpers/poll.c
+++ b/rust/helpers/poll.c
@@ -3,8 +3,9 @@
 #include <linux/export.h>
 #include <linux/poll.h>
 
-void rust_helper_poll_wait(struct file *filp, wait_queue_head_t *wait_address,
-			   poll_table *p)
+__rust_helper void rust_helper_poll_wait(struct file *filp,
+					 wait_queue_head_t *wait_address,
+					 poll_table *p)
 {
 	poll_wait(filp, wait_address, p);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 30/46] rust: processor: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (28 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 29/46] rust: poll: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 31/46] rust: property: " Alice Ryhl
                   ` (18 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, FUJITA Tomonori, Andreas Hindborg,
	Miguel Ojeda, Daniel Almeida

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
---
 rust/helpers/processor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/processor.c b/rust/helpers/processor.c
index d41355e14d6eb593beb018b5709118afe855c852..76fadbb647c5592db4526569fb1ed6b04ed17e87 100644
--- a/rust/helpers/processor.c
+++ b/rust/helpers/processor.c
@@ -2,7 +2,7 @@
 
 #include <linux/processor.h>
 
-void rust_helper_cpu_relax(void)
+__rust_helper void rust_helper_cpu_relax(void)
 {
 	cpu_relax();
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 31/46] rust: property: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (29 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 30/46] rust: processor: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 32/46] rust: rbtree: " Alice Ryhl
                   ` (17 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Remo Senekowitsch

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Remo Senekowitsch <remo@buenzli.dev>
---
 rust/helpers/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/property.c b/rust/helpers/property.c
index 08f68e2dac4a983c06d84a72d56247f19333cae2..8fb9900533ef45e2ce2b21ac7b000ac3fe6291ab 100644
--- a/rust/helpers/property.c
+++ b/rust/helpers/property.c
@@ -2,7 +2,7 @@
 
 #include <linux/property.h>
 
-void rust_helper_fwnode_handle_put(struct fwnode_handle *fwnode)
+__rust_helper void rust_helper_fwnode_handle_put(struct fwnode_handle *fwnode)
 {
 	fwnode_handle_put(fwnode);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 32/46] rust: rbtree: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (30 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 31/46] rust: property: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 33/46] rust: rcu: " Alice Ryhl
                   ` (16 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 rust/helpers/rbtree.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/rbtree.c b/rust/helpers/rbtree.c
index 6d404b84a9b53990cf7b301cb501f3b3332749e9..025f80a37203e3cbf05a42947047a58035018735 100644
--- a/rust/helpers/rbtree.c
+++ b/rust/helpers/rbtree.c
@@ -2,8 +2,9 @@
 
 #include <linux/rbtree.h>
 
-void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent,
-			      struct rb_node **rb_link)
+__rust_helper void rust_helper_rb_link_node(struct rb_node *node,
+					    struct rb_node *parent,
+					    struct rb_node **rb_link)
 {
 	rb_link_node(node, parent, rb_link);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 33/46] rust: rcu: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (31 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 32/46] rust: rbtree: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 34/46] rust: refcount: " Alice Ryhl
                   ` (15 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Paul E. McKenney, Boqun Feng, rcu

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: rcu@vger.kernel.org
---
 rust/helpers/rcu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/helpers/rcu.c b/rust/helpers/rcu.c
index f1cec6583513497e996f74835ca2c6c3f4a8c954..481274c058577276e20093a1014fc49f4a40421b 100644
--- a/rust/helpers/rcu.c
+++ b/rust/helpers/rcu.c
@@ -2,12 +2,12 @@
 
 #include <linux/rcupdate.h>
 
-void rust_helper_rcu_read_lock(void)
+__rust_helper void rust_helper_rcu_read_lock(void)
 {
 	rcu_read_lock();
 }
 
-void rust_helper_rcu_read_unlock(void)
+__rust_helper void rust_helper_rcu_read_unlock(void)
 {
 	rcu_read_unlock();
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 34/46] rust: refcount: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (32 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 33/46] rust: rcu: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:37 ` [PATCH 35/46] rust: regulator: " Alice Ryhl
                   ` (14 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Boqun Feng, Will Deacon, Peter Zijlstra,
	Fiona Behrens, Benno Lossin, Gary Guo

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Fiona Behrens <me@kloenk.dev>
Cc: Benno Lossin <lossin@kernel.org>
Cc: Gary Guo <gary@garyguo.net>
---
 rust/helpers/refcount.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/rust/helpers/refcount.c b/rust/helpers/refcount.c
index d175898ad7b81ee9da3d9d125764db02e837da52..36334a674ee42eb46792210903a0e3cf9debd9a1 100644
--- a/rust/helpers/refcount.c
+++ b/rust/helpers/refcount.c
@@ -2,27 +2,27 @@
 
 #include <linux/refcount.h>
 
-refcount_t rust_helper_REFCOUNT_INIT(int n)
+__rust_helper refcount_t rust_helper_REFCOUNT_INIT(int n)
 {
 	return (refcount_t)REFCOUNT_INIT(n);
 }
 
-void rust_helper_refcount_set(refcount_t *r, int n)
+__rust_helper void rust_helper_refcount_set(refcount_t *r, int n)
 {
 	refcount_set(r, n);
 }
 
-void rust_helper_refcount_inc(refcount_t *r)
+__rust_helper void rust_helper_refcount_inc(refcount_t *r)
 {
 	refcount_inc(r);
 }
 
-void rust_helper_refcount_dec(refcount_t *r)
+__rust_helper void rust_helper_refcount_dec(refcount_t *r)
 {
 	refcount_dec(r);
 }
 
-bool rust_helper_refcount_dec_and_test(refcount_t *r)
+__rust_helper bool rust_helper_refcount_dec_and_test(refcount_t *r)
 {
 	return refcount_dec_and_test(r);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 35/46] rust: regulator: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (33 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 34/46] rust: refcount: " Alice Ryhl
@ 2025-12-02 19:37 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 36/46] rust: scatterlist: " Alice Ryhl
                   ` (13 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:37 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Liam Girdwood, Mark Brown,
	Alexandre Courbot, Daniel Almeida, Boqun Feng

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
---
 rust/helpers/regulator.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/rust/helpers/regulator.c b/rust/helpers/regulator.c
index 11bc332443bd064f4b5afd350ffc045badff9076..9ec5237f449b9a67ee378d15a761304281f1c483 100644
--- a/rust/helpers/regulator.c
+++ b/rust/helpers/regulator.c
@@ -4,48 +4,52 @@
 
 #ifndef CONFIG_REGULATOR
 
-void rust_helper_regulator_put(struct regulator *regulator)
+__rust_helper void rust_helper_regulator_put(struct regulator *regulator)
 {
 	regulator_put(regulator);
 }
 
-int rust_helper_regulator_set_voltage(struct regulator *regulator, int min_uV,
-				      int max_uV)
+__rust_helper int rust_helper_regulator_set_voltage(struct regulator *regulator,
+						    int min_uV, int max_uV)
 {
 	return regulator_set_voltage(regulator, min_uV, max_uV);
 }
 
-int rust_helper_regulator_get_voltage(struct regulator *regulator)
+__rust_helper int rust_helper_regulator_get_voltage(struct regulator *regulator)
 {
 	return regulator_get_voltage(regulator);
 }
 
-struct regulator *rust_helper_regulator_get(struct device *dev, const char *id)
+__rust_helper struct regulator *rust_helper_regulator_get(struct device *dev,
+							  const char *id)
 {
 	return regulator_get(dev, id);
 }
 
-int rust_helper_regulator_enable(struct regulator *regulator)
+__rust_helper int rust_helper_regulator_enable(struct regulator *regulator)
 {
 	return regulator_enable(regulator);
 }
 
-int rust_helper_regulator_disable(struct regulator *regulator)
+__rust_helper int rust_helper_regulator_disable(struct regulator *regulator)
 {
 	return regulator_disable(regulator);
 }
 
-int rust_helper_regulator_is_enabled(struct regulator *regulator)
+__rust_helper int rust_helper_regulator_is_enabled(struct regulator *regulator)
 {
 	return regulator_is_enabled(regulator);
 }
 
-int rust_helper_devm_regulator_get_enable(struct device *dev, const char *id)
+__rust_helper int rust_helper_devm_regulator_get_enable(struct device *dev,
+							const char *id)
 {
 	return devm_regulator_get_enable(dev, id);
 }
 
-int rust_helper_devm_regulator_get_enable_optional(struct device *dev, const char *id)
+__rust_helper int
+rust_helper_devm_regulator_get_enable_optional(struct device *dev,
+					       const char *id)
 {
 	return devm_regulator_get_enable_optional(dev, id);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 36/46] rust: scatterlist: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (34 preceding siblings ...)
  2025-12-02 19:37 ` [PATCH 35/46] rust: regulator: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 37/46] rust: security: " Alice Ryhl
                   ` (12 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Danilo Krummrich, Abdiel Janulgue,
	Daniel Almeida, Robin Murphy, Andreas Hindborg

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Abdiel Janulgue <abdiel.janulgue@gmail.com>
Cc: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
---
 rust/helpers/scatterlist.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/rust/helpers/scatterlist.c b/rust/helpers/scatterlist.c
index 80c956ee09ab4119a0951709c6f339a2a2c23894..f3c41ea5e20162d670d37557165de71325356351 100644
--- a/rust/helpers/scatterlist.c
+++ b/rust/helpers/scatterlist.c
@@ -2,23 +2,25 @@
 
 #include <linux/dma-direction.h>
 
-dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg)
+__rust_helper dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg)
 {
 	return sg_dma_address(sg);
 }
 
-unsigned int rust_helper_sg_dma_len(struct scatterlist *sg)
+__rust_helper unsigned int rust_helper_sg_dma_len(struct scatterlist *sg)
 {
 	return sg_dma_len(sg);
 }
 
-struct scatterlist *rust_helper_sg_next(struct scatterlist *sg)
+__rust_helper struct scatterlist *rust_helper_sg_next(struct scatterlist *sg)
 {
 	return sg_next(sg);
 }
 
-void rust_helper_dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
-				   enum dma_data_direction dir, unsigned long attrs)
+__rust_helper void rust_helper_dma_unmap_sgtable(struct device *dev,
+						 struct sg_table *sgt,
+						 enum dma_data_direction dir,
+						 unsigned long attrs)
 {
 	return dma_unmap_sgtable(dev, sgt, dir, attrs);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 37/46] rust: security: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (35 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 36/46] rust: scatterlist: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 38/46] rust: slab: " Alice Ryhl
                   ` (11 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Paul Moore, Greg Kroah-Hartman,
	linux-security-module

This is needed to inline these helpers into Rust code.

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.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 38/46] rust: slab: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (36 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 37/46] rust: security: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-03  1:45   ` Boqun Feng
  2025-12-02 19:38 ` [PATCH 39/46] rust: sync: " Alice Ryhl
                   ` (10 subsequent siblings)
  48 siblings, 1 reply; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Vlastimil Babka, Andrew Morton,
	Christoph Lameter, David Rientjes, Vitaly Wool, Danilo Krummrich

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@gentwo.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.se>
Cc: Danilo Krummrich <dakr@kernel.org>
---
 rust/helpers/slab.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/rust/helpers/slab.c b/rust/helpers/slab.c
index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..970161023d8885935f2116fe81949d0ed622f9e9 100644
--- a/rust/helpers/slab.c
+++ b/rust/helpers/slab.c
@@ -2,16 +2,18 @@
 
 #include <linux/slab.h>
 
-void * __must_check __realloc_size(2)
-rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
-				gfp_t flags, int node)
+__rust_helper void *__must_check __realloc_size(2)
+	rust_helper_krealloc_node_align(const void *objp, size_t new_size,
+					unsigned long align, gfp_t flags,
+					int node)
 {
 	return krealloc_node_align(objp, new_size, align, flags, node);
 }
 
-void * __must_check __realloc_size(2)
-rust_helper_kvrealloc_node_align(const void *p, size_t size, unsigned long align,
-				 gfp_t flags, int node)
+__rust_helper void *__must_check __realloc_size(2)
+	rust_helper_kvrealloc_node_align(const void *p, size_t size,
+					 unsigned long align, gfp_t flags,
+					 int node)
 {
 	return kvrealloc_node_align(p, size, align, flags, node);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 39/46] rust: sync: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (37 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 38/46] rust: slab: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 40/46] rust: task: " Alice Ryhl
                   ` (9 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Peter Zijlstra, Ingo Molnar,
	Will Deacon, Boqun Feng, Waiman Long, Mitchell Levy, Benno Lossin

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Mitchell Levy <levymitchell0@gmail.com>
Cc: Benno Lossin <lossin@kernel.org>
---
 rust/helpers/mutex.c    | 13 +++++++------
 rust/helpers/spinlock.c | 13 +++++++------
 rust/helpers/sync.c     |  4 ++--
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/rust/helpers/mutex.c b/rust/helpers/mutex.c
index e487819125f0dfe0741601205e8f84d322c973d5..1b07d6e64299d509bc3ce1af99b19aa97b721fc6 100644
--- a/rust/helpers/mutex.c
+++ b/rust/helpers/mutex.c
@@ -2,28 +2,29 @@
 
 #include <linux/mutex.h>
 
-void rust_helper_mutex_lock(struct mutex *lock)
+__rust_helper void rust_helper_mutex_lock(struct mutex *lock)
 {
 	mutex_lock(lock);
 }
 
-int rust_helper_mutex_trylock(struct mutex *lock)
+__rust_helper int rust_helper_mutex_trylock(struct mutex *lock)
 {
 	return mutex_trylock(lock);
 }
 
-void rust_helper___mutex_init(struct mutex *mutex, const char *name,
-			      struct lock_class_key *key)
+__rust_helper void rust_helper___mutex_init(struct mutex *mutex,
+					    const char *name,
+					    struct lock_class_key *key)
 {
 	__mutex_init(mutex, name, key);
 }
 
-void rust_helper_mutex_assert_is_held(struct mutex *mutex)
+__rust_helper void rust_helper_mutex_assert_is_held(struct mutex *mutex)
 {
 	lockdep_assert_held(mutex);
 }
 
-void rust_helper_mutex_destroy(struct mutex *lock)
+__rust_helper void rust_helper_mutex_destroy(struct mutex *lock)
 {
 	mutex_destroy(lock);
 }
diff --git a/rust/helpers/spinlock.c b/rust/helpers/spinlock.c
index 42c4bf01a23e4003ea82c65b16bc8f495ad37750..4d13062cf253e67894aaa9ba968ff381db2c651e 100644
--- a/rust/helpers/spinlock.c
+++ b/rust/helpers/spinlock.c
@@ -2,8 +2,9 @@
 
 #include <linux/spinlock.h>
 
-void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
-				  struct lock_class_key *key)
+__rust_helper void rust_helper___spin_lock_init(spinlock_t *lock,
+						const char *name,
+						struct lock_class_key *key)
 {
 #ifdef CONFIG_DEBUG_SPINLOCK
 # if defined(CONFIG_PREEMPT_RT)
@@ -16,22 +17,22 @@ void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
 #endif /* CONFIG_DEBUG_SPINLOCK */
 }
 
-void rust_helper_spin_lock(spinlock_t *lock)
+__rust_helper void rust_helper_spin_lock(spinlock_t *lock)
 {
 	spin_lock(lock);
 }
 
-void rust_helper_spin_unlock(spinlock_t *lock)
+__rust_helper void rust_helper_spin_unlock(spinlock_t *lock)
 {
 	spin_unlock(lock);
 }
 
-int rust_helper_spin_trylock(spinlock_t *lock)
+__rust_helper int rust_helper_spin_trylock(spinlock_t *lock)
 {
 	return spin_trylock(lock);
 }
 
-void rust_helper_spin_assert_is_held(spinlock_t *lock)
+__rust_helper void rust_helper_spin_assert_is_held(spinlock_t *lock)
 {
 	lockdep_assert_held(lock);
 }
diff --git a/rust/helpers/sync.c b/rust/helpers/sync.c
index ff7e68b4881011ce0aa9beb2df14bf0ffd147337..82d6aff73b04f0ab1030bb5170e40ed6ccac41c0 100644
--- a/rust/helpers/sync.c
+++ b/rust/helpers/sync.c
@@ -2,12 +2,12 @@
 
 #include <linux/lockdep.h>
 
-void rust_helper_lockdep_register_key(struct lock_class_key *k)
+__rust_helper void rust_helper_lockdep_register_key(struct lock_class_key *k)
 {
 	lockdep_register_key(k);
 }
 
-void rust_helper_lockdep_unregister_key(struct lock_class_key *k)
+__rust_helper void rust_helper_lockdep_unregister_key(struct lock_class_key *k)
 {
 	lockdep_unregister_key(k);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 40/46] rust: task: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (38 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 39/46] rust: sync: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 41/46] rust: time: " Alice Ryhl
                   ` (8 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Boqun Feng, FUJITA Tomonori

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
 rust/helpers/signal.c |  2 +-
 rust/helpers/task.c   | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/rust/helpers/signal.c b/rust/helpers/signal.c
index 1a6bbe9438e281cd8b61141a390cea042949e7bd..85111186cf3d77508fefac9407c87c5f000d15cf 100644
--- a/rust/helpers/signal.c
+++ b/rust/helpers/signal.c
@@ -2,7 +2,7 @@
 
 #include <linux/sched/signal.h>
 
-int rust_helper_signal_pending(struct task_struct *t)
+__rust_helper int rust_helper_signal_pending(struct task_struct *t)
 {
 	return signal_pending(t);
 }
diff --git a/rust/helpers/task.c b/rust/helpers/task.c
index 2c85bbc2727efedf5eb61fe496cd80598fafcdd1..c0e1a06ede78c0b0641707b52a82725543e2c02c 100644
--- a/rust/helpers/task.c
+++ b/rust/helpers/task.c
@@ -3,60 +3,60 @@
 #include <linux/kernel.h>
 #include <linux/sched/task.h>
 
-void rust_helper_might_resched(void)
+__rust_helper void rust_helper_might_resched(void)
 {
 	might_resched();
 }
 
-struct task_struct *rust_helper_get_current(void)
+__rust_helper struct task_struct *rust_helper_get_current(void)
 {
 	return current;
 }
 
-void rust_helper_get_task_struct(struct task_struct *t)
+__rust_helper void rust_helper_get_task_struct(struct task_struct *t)
 {
 	get_task_struct(t);
 }
 
-void rust_helper_put_task_struct(struct task_struct *t)
+__rust_helper void rust_helper_put_task_struct(struct task_struct *t)
 {
 	put_task_struct(t);
 }
 
-kuid_t rust_helper_task_uid(struct task_struct *task)
+__rust_helper kuid_t rust_helper_task_uid(struct task_struct *task)
 {
 	return task_uid(task);
 }
 
-kuid_t rust_helper_task_euid(struct task_struct *task)
+__rust_helper kuid_t rust_helper_task_euid(struct task_struct *task)
 {
 	return task_euid(task);
 }
 
 #ifndef CONFIG_USER_NS
-uid_t rust_helper_from_kuid(struct user_namespace *to, kuid_t uid)
+__rust_helper uid_t rust_helper_from_kuid(struct user_namespace *to, kuid_t uid)
 {
 	return from_kuid(to, uid);
 }
 #endif /* CONFIG_USER_NS */
 
-bool rust_helper_uid_eq(kuid_t left, kuid_t right)
+__rust_helper bool rust_helper_uid_eq(kuid_t left, kuid_t right)
 {
 	return uid_eq(left, right);
 }
 
-kuid_t rust_helper_current_euid(void)
+__rust_helper kuid_t rust_helper_current_euid(void)
 {
 	return current_euid();
 }
 
-struct user_namespace *rust_helper_current_user_ns(void)
+__rust_helper struct user_namespace *rust_helper_current_user_ns(void)
 {
 	return current_user_ns();
 }
 
-pid_t rust_helper_task_tgid_nr_ns(struct task_struct *tsk,
-				  struct pid_namespace *ns)
+__rust_helper pid_t rust_helper_task_tgid_nr_ns(struct task_struct *tsk,
+						struct pid_namespace *ns)
 {
 	return task_tgid_nr_ns(tsk, ns);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 41/46] rust: time: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (39 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 40/46] rust: task: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 42/46] rust: uaccess: " Alice Ryhl
                   ` (7 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Andreas Hindborg, Boqun Feng,
	FUJITA Tomonori, Frederic Weisbecker, Lyude Paul, Thomas Gleixner,
	Anna-Maria Behnsen, John Stultz, Stephen Boyd, Fiona Behrens,
	Gary Guo

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: John Stultz <jstultz@google.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Fiona Behrens <me@kloenk.dev>
Cc: Gary Guo <gary@garyguo.net>
---
 rust/helpers/time.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/rust/helpers/time.c b/rust/helpers/time.c
index a318e9fa4408230881eed047154e30eb00e3cb6f..ce394641b17c371eb9b52dd1a753c04efd975d2d 100644
--- a/rust/helpers/time.c
+++ b/rust/helpers/time.c
@@ -4,32 +4,32 @@
 #include <linux/ktime.h>
 #include <linux/timekeeping.h>
 
-void rust_helper_fsleep(unsigned long usecs)
+__rust_helper void rust_helper_fsleep(unsigned long usecs)
 {
 	fsleep(usecs);
 }
 
-ktime_t rust_helper_ktime_get_real(void)
+__rust_helper ktime_t rust_helper_ktime_get_real(void)
 {
 	return ktime_get_real();
 }
 
-ktime_t rust_helper_ktime_get_boottime(void)
+__rust_helper ktime_t rust_helper_ktime_get_boottime(void)
 {
 	return ktime_get_boottime();
 }
 
-ktime_t rust_helper_ktime_get_clocktai(void)
+__rust_helper ktime_t rust_helper_ktime_get_clocktai(void)
 {
 	return ktime_get_clocktai();
 }
 
-s64 rust_helper_ktime_to_us(const ktime_t kt)
+__rust_helper s64 rust_helper_ktime_to_us(const ktime_t kt)
 {
 	return ktime_to_us(kt);
 }
 
-s64 rust_helper_ktime_to_ms(const ktime_t kt)
+__rust_helper s64 rust_helper_ktime_to_ms(const ktime_t kt)
 {
 	return ktime_to_ms(kt);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 42/46] rust: uaccess: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (40 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 41/46] rust: time: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 43/46] rust: usb: " Alice Ryhl
                   ` (6 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Greg Kroah-Hartman

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 rust/helpers/uaccess.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/rust/helpers/uaccess.c b/rust/helpers/uaccess.c
index f49076f813cd641a55b3a083ac3f7fbcdf53abb6..302e06d264360ac7afd255f434e2f3f8848a5424 100644
--- a/rust/helpers/uaccess.c
+++ b/rust/helpers/uaccess.c
@@ -2,14 +2,14 @@
 
 #include <linux/uaccess.h>
 
-unsigned long rust_helper_copy_from_user(void *to, const void __user *from,
-					 unsigned long n)
+__rust_helper unsigned long
+rust_helper_copy_from_user(void *to, const void __user *from, unsigned long n)
 {
 	return copy_from_user(to, from, n);
 }
 
-unsigned long rust_helper_copy_to_user(void __user *to, const void *from,
-				       unsigned long n)
+__rust_helper unsigned long
+rust_helper_copy_to_user(void __user *to, const void *from, unsigned long n)
 {
 	return copy_to_user(to, from, n);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 43/46] rust: usb: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (41 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 42/46] rust: uaccess: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 44/46] rust: wait: " Alice Ryhl
                   ` (5 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Greg Kroah-Hartman, linux-usb,
	Daniel Almeida

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: Daniel Almeida <daniel.almeida@collabora.com>
---
 rust/helpers/usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/helpers/usb.c b/rust/helpers/usb.c
index fb2aad0cbf4d26ac7fb1a3f176ee7a1d30800f92..eff1cf7be3c2d10b7e9248252d354eb8a4fd4c94 100644
--- a/rust/helpers/usb.c
+++ b/rust/helpers/usb.c
@@ -2,7 +2,8 @@
 
 #include <linux/usb.h>
 
-struct usb_device *rust_helper_interface_to_usbdev(struct usb_interface *intf)
+__rust_helper struct usb_device *
+rust_helper_interface_to_usbdev(struct usb_interface *intf)
 {
 	return interface_to_usbdev(intf);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 44/46] rust: wait: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (42 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 43/46] rust: usb: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 45/46] rust: workqueue: " Alice Ryhl
                   ` (4 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Peter Zijlstra, Ingo Molnar,
	Thomas Gleixner, Anna-Maria Behnsen

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
 rust/helpers/wait.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/wait.c b/rust/helpers/wait.c
index ae48e33d9da3b0a780722b79b89d8d766efae17b..2dde1e4517809d20d09cb9a355f8005fcb160d4a 100644
--- a/rust/helpers/wait.c
+++ b/rust/helpers/wait.c
@@ -2,7 +2,7 @@
 
 #include <linux/wait.h>
 
-void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
+__rust_helper void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
 {
 	init_wait(wq_entry);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 45/46] rust: workqueue: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (43 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 44/46] rust: wait: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-02 19:38 ` [PATCH 46/46] rust: xarray: " Alice Ryhl
                   ` (3 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, Alice Ryhl, Tejun Heo, Lai Jiangshan

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
---
 rust/helpers/workqueue.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/rust/helpers/workqueue.c b/rust/helpers/workqueue.c
index b2b82753509bf5dbd0f4ddebb96a95a51e5976b1..ce1c3a5b215028cc04e2f4a7d9c9c60931792e07 100644
--- a/rust/helpers/workqueue.c
+++ b/rust/helpers/workqueue.c
@@ -2,9 +2,11 @@
 
 #include <linux/workqueue.h>
 
-void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func,
-				    bool onstack, const char *name,
-				    struct lock_class_key *key)
+__rust_helper void rust_helper_init_work_with_key(struct work_struct *work,
+						  work_func_t func,
+						  bool onstack,
+						  const char *name,
+						  struct lock_class_key *key)
 {
 	__init_work(work, onstack);
 	work->data = (atomic_long_t)WORK_DATA_INIT();

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* [PATCH 46/46] rust: xarray: add __rust_helper to helpers
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (44 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 45/46] rust: workqueue: " Alice Ryhl
@ 2025-12-02 19:38 ` Alice Ryhl
  2025-12-03  1:47 ` [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Boqun Feng
                   ` (2 subsequent siblings)
  48 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-02 19:38 UTC (permalink / raw)
  To: rust-for-linux
  Cc: linux-kernel, Alice Ryhl, Andrew Morton, Matthew Wilcox,
	Tamir Duberstein, Andreas Hindborg, linux-fsdevel, linux-mm

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Tamir Duberstein <tamird@gmail.com>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
---
 rust/helpers/xarray.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/rust/helpers/xarray.c b/rust/helpers/xarray.c
index 60b299f11451d2c4a75e50e25dec4dac13f143f4..08979b3043410ff89d2adc0b2597825115c5100f 100644
--- a/rust/helpers/xarray.c
+++ b/rust/helpers/xarray.c
@@ -2,27 +2,27 @@
 
 #include <linux/xarray.h>
 
-int rust_helper_xa_err(void *entry)
+__rust_helper int rust_helper_xa_err(void *entry)
 {
 	return xa_err(entry);
 }
 
-void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
+__rust_helper void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
 {
 	return xa_init_flags(xa, flags);
 }
 
-int rust_helper_xa_trylock(struct xarray *xa)
+__rust_helper int rust_helper_xa_trylock(struct xarray *xa)
 {
 	return xa_trylock(xa);
 }
 
-void rust_helper_xa_lock(struct xarray *xa)
+__rust_helper void rust_helper_xa_lock(struct xarray *xa)
 {
 	return xa_lock(xa);
 }
 
-void rust_helper_xa_unlock(struct xarray *xa)
+__rust_helper void rust_helper_xa_unlock(struct xarray *xa)
 {
 	return xa_unlock(xa);
 }

-- 
2.52.0.158.g65b55ccf14-goog


^ permalink raw reply related	[flat|nested] 56+ messages in thread

* Re: [PATCH 24/46] rust: mm: add __rust_helper to helpers
  2025-12-02 19:37 ` [PATCH 24/46] rust: mm: " Alice Ryhl
@ 2025-12-03  1:43   ` Boqun Feng
  2025-12-03  9:03     ` Alice Ryhl
  0 siblings, 1 reply; 56+ messages in thread
From: Boqun Feng @ 2025-12-03  1:43 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: rust-for-linux, linux-kernel, Andrew Morton, Lorenzo Stoakes,
	Liam R. Howlett, Uladzislau Rezki, Vitaly Wool, linux-mm

On Tue, Dec 02, 2025 at 07:37:48PM +0000, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
[...]
> --- a/rust/helpers/vmalloc.c
> +++ b/rust/helpers/vmalloc.c
> @@ -2,9 +2,10 @@
>  
>  #include <linux/vmalloc.h>
>  
> -void * __must_check __realloc_size(2)
> -rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
> -				gfp_t flags, int node)
> +__rust_helper void *__must_check __realloc_size(2)
> +	rust_helper_vrealloc_node_align(const void *p, size_t size,

The indent here seems to be incorrect?

Regards,
Boqun

> +					unsigned long align, gfp_t flags,
> +					int node)
>  {
>  	return vrealloc_node_align(p, size, align, flags, node);
>  }
> 
> -- 
> 2.52.0.158.g65b55ccf14-goog
> 
> 

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 38/46] rust: slab: add __rust_helper to helpers
  2025-12-02 19:38 ` [PATCH 38/46] rust: slab: " Alice Ryhl
@ 2025-12-03  1:45   ` Boqun Feng
  2025-12-03  9:03     ` Alice Ryhl
  0 siblings, 1 reply; 56+ messages in thread
From: Boqun Feng @ 2025-12-03  1:45 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: rust-for-linux, linux-kernel, Vlastimil Babka, Andrew Morton,
	Christoph Lameter, David Rientjes, Vitaly Wool, Danilo Krummrich

On Tue, Dec 02, 2025 at 07:38:02PM +0000, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Christoph Lameter <cl@gentwo.org>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Vitaly Wool <vitaly.wool@konsulko.se>
> Cc: Danilo Krummrich <dakr@kernel.org>
> ---
>  rust/helpers/slab.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/rust/helpers/slab.c b/rust/helpers/slab.c
> index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..970161023d8885935f2116fe81949d0ed622f9e9 100644
> --- a/rust/helpers/slab.c
> +++ b/rust/helpers/slab.c
> @@ -2,16 +2,18 @@
>  
>  #include <linux/slab.h>
>  
> -void * __must_check __realloc_size(2)
> -rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
> -				gfp_t flags, int node)
> +__rust_helper void *__must_check __realloc_size(2)
> +	rust_helper_krealloc_node_align(const void *objp, size_t new_size,

Similar here, shouldn't it be:


__rust_helper void *__must_check __realloc_size(2)
rust_helper_krealloc_node_align(const void *objp, size_t new_size,
				unsigned long align, gfp_t flags,
				int node)

?
> +					unsigned long align, gfp_t flags,
> +					int node)
>  {
>  	return krealloc_node_align(objp, new_size, align, flags, node);
>  }
>  
> -void * __must_check __realloc_size(2)
> -rust_helper_kvrealloc_node_align(const void *p, size_t size, unsigned long align,
> -				 gfp_t flags, int node)
> +__rust_helper void *__must_check __realloc_size(2)
> +	rust_helper_kvrealloc_node_align(const void *p, size_t size,

Ditto.

Regards,
Boqun

> +					 unsigned long align, gfp_t flags,
> +					 int node)
>  {
>  	return kvrealloc_node_align(p, size, align, flags, node);
>  }
> 
> -- 
> 2.52.0.158.g65b55ccf14-goog
> 
> 

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 00/46] Allow inlining C helpers into Rust when using LTO
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (45 preceding siblings ...)
  2025-12-02 19:38 ` [PATCH 46/46] rust: xarray: " Alice Ryhl
@ 2025-12-03  1:47 ` Boqun Feng
  2025-12-03 14:33 ` Gary Guo
  2025-12-04 10:05 ` (subset) " Christian Brauner
  48 siblings, 0 replies; 56+ messages in thread
From: Boqun Feng @ 2025-12-03  1:47 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: rust-for-linux, linux-kernel, Greg Kroah-Hartman, Dave Ertman,
	Ira Weiny, Leon Romanovsky, Peter Zijlstra, Elle Rhumsaa,
	Carlos Llamas, Yury Norov, Andreas Hindborg, linux-block,
	FUJITA Tomonori, Miguel Ojeda, Michael Turquette, Stephen Boyd,
	linux-clk, Benno Lossin, Danilo Krummrich, Thomas Gleixner,
	Rafael J. Wysocki, Viresh Kumar, linux-pm, Paul Moore,
	Serge Hallyn, linux-security-module, Daniel Almeida,
	Abdiel Janulgue, Robin Murphy, Lyude Paul, Alexander Viro,
	Christian Brauner, Jan Kara, linux-fsdevel, Josh Poimboeuf,
	Jason Baron, Steven Rostedt, Ard Biesheuvel, Brendan Higgins,
	David Gow, Rae Moar, linux-kselftest, Andrew Morton,
	Liam R. Howlett, Andrew Ballance, maple-tree, linux-mm,
	Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool, Rob Herring,
	Saravana Kannan, devicetree, Bjorn Helgaas,
	Krzysztof Wilczy´nski, linux-pci, Remo Senekowitsch,
	Paul E. McKenney, rcu, Will Deacon, Fiona Behrens, Gary Guo,
	Liam Girdwood, Mark Brown, Alexandre Courbot, Vlastimil Babka,
	Christoph Lameter, David Rientjes, Ingo Molnar, Waiman Long,
	Mitchell Levy, Frederic Weisbecker, Anna-Maria Behnsen,
	John Stultz, linux-usb, Tejun Heo, Lai Jiangshan, Matthew Wilcox,
	Tamir Duberstein

On Tue, Dec 02, 2025 at 07:37:24PM +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.
> 
> These changes were generated by adding __rust_helper and running
> ClangFormat. Unrelated formatting changes were removed manually.
> 
> Why is __rust_helper needed?
> ============================
> 
> Currently, C helpers cannot be inlined into Rust even when using LTO
> because LLVM detects slightly different options on the codegen units.
> 
> * LLVM doesn't want to inline functions compiled with
>   `-fno-delete-null-pointer-checks` with code compiled without. The C
>   CGUs all have this enabled and Rust CGUs don't. Inlining is okay since
>   this is one of the hardening features that does not change the ABI,
>   and we shouldn't have null pointer dereferences in these helpers.
> 
> * LLVM doesn't want to inline functions with different list of builtins. C
>   side has `-fno-builtin-wcslen`; `wcslen` is not a Rust builtin, so
>   they should be compatible, but LLVM does not perform inlining due to
>   attributes mismatch.
> 
> * clang and Rust doesn't have the exact target string. Clang generates
>   `+cmov,+cx8,+fxsr` but Rust doesn't enable them (in fact, Rust will
>   complain if `-Ctarget-feature=+cmov,+cx8,+fxsr` is used). x86-64
>   always enable these features, so they are in fact the same target
>   string, but LLVM doesn't understand this and so inlining is inhibited.
>   This can be bypassed with `--ignore-tti-inline-compatible`, but this
>   is a hidden option.
> 
> (This analysis was written by Gary Guo.)
> 
> How is this fixed?
> ==================
> 
> To fix this we need to add __always_inline to all helpers when compiling
> with LTO. However, it should not be added when running bindgen as
> bindgen will ignore functions marked inline. To achieve this, we are
> using a #define called __rust_helper that is defined differently
> depending on whether bindgen is running or not.
> 
> Note that __rust_helper is currently always #defined to nothing.
> Changing it to __always_inline will happen separately in another patch
> series.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

For the whole series:

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>

Regards,
Boqun

> ---
[...]

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 11/46] rust: cpufreq: add __rust_helper to helpers
  2025-12-02 19:37 ` [PATCH 11/46] rust: cpufreq: " Alice Ryhl
@ 2025-12-03  5:48   ` Viresh Kumar
  0 siblings, 0 replies; 56+ messages in thread
From: Viresh Kumar @ 2025-12-03  5:48 UTC (permalink / raw)
  To: Alice Ryhl; +Cc: rust-for-linux, linux-kernel, Rafael J. Wysocki, linux-pm

On 02-12-25, 19:37, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: linux-pm@vger.kernel.org
> ---
>  rust/helpers/cpufreq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/rust/helpers/cpufreq.c b/rust/helpers/cpufreq.c
> index 7c1343c4d65eaff6f62255b6c9a9a67f89af1541..0e16aeef2b5a696bf8974f37d9e5e3c24d999f40 100644
> --- a/rust/helpers/cpufreq.c
> +++ b/rust/helpers/cpufreq.c
> @@ -3,7 +3,8 @@
>  #include <linux/cpufreq.h>
>  
>  #ifdef CONFIG_CPU_FREQ
> -void rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy)
> +__rust_helper void
> +rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy)
>  {
>  	cpufreq_register_em_with_opp(policy);
>  }

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 38/46] rust: slab: add __rust_helper to helpers
  2025-12-03  1:45   ` Boqun Feng
@ 2025-12-03  9:03     ` Alice Ryhl
  0 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-03  9:03 UTC (permalink / raw)
  To: Boqun Feng
  Cc: rust-for-linux, linux-kernel, Vlastimil Babka, Andrew Morton,
	Christoph Lameter, David Rientjes, Vitaly Wool, Danilo Krummrich

On Tue, Dec 02, 2025 at 05:45:34PM -0800, Boqun Feng wrote:
> On Tue, Dec 02, 2025 at 07:38:02PM +0000, Alice Ryhl wrote:
> > This is needed to inline these helpers into Rust code.
> > 
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> > ---
> > Cc: Vlastimil Babka <vbabka@suse.cz>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Christoph Lameter <cl@gentwo.org>
> > Cc: David Rientjes <rientjes@google.com>
> > Cc: Vitaly Wool <vitaly.wool@konsulko.se>
> > Cc: Danilo Krummrich <dakr@kernel.org>
> > ---
> >  rust/helpers/slab.c | 14 ++++++++------
> >  1 file changed, 8 insertions(+), 6 deletions(-)
> > 
> > diff --git a/rust/helpers/slab.c b/rust/helpers/slab.c
> > index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..970161023d8885935f2116fe81949d0ed622f9e9 100644
> > --- a/rust/helpers/slab.c
> > +++ b/rust/helpers/slab.c
> > @@ -2,16 +2,18 @@
> >  
> >  #include <linux/slab.h>
> >  
> > -void * __must_check __realloc_size(2)
> > -rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
> > -				gfp_t flags, int node)
> > +__rust_helper void *__must_check __realloc_size(2)
> > +	rust_helper_krealloc_node_align(const void *objp, size_t new_size,
> 
> Similar here, shouldn't it be:
> 
> 
> __rust_helper void *__must_check __realloc_size(2)
> rust_helper_krealloc_node_align(const void *objp, size_t new_size,
> 				unsigned long align, gfp_t flags,
> 				int node)

This is what I got from ClangFormat, but your suggestion does look
better, so I'll update it.

Alice

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 24/46] rust: mm: add __rust_helper to helpers
  2025-12-03  1:43   ` Boqun Feng
@ 2025-12-03  9:03     ` Alice Ryhl
  0 siblings, 0 replies; 56+ messages in thread
From: Alice Ryhl @ 2025-12-03  9:03 UTC (permalink / raw)
  To: Boqun Feng
  Cc: rust-for-linux, linux-kernel, Andrew Morton, Lorenzo Stoakes,
	Liam R. Howlett, Uladzislau Rezki, Vitaly Wool, linux-mm

On Tue, Dec 02, 2025 at 05:43:10PM -0800, Boqun Feng wrote:
> On Tue, Dec 02, 2025 at 07:37:48PM +0000, Alice Ryhl wrote:
> > This is needed to inline these helpers into Rust code.
> > 
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> > ---
> [...]
> > --- a/rust/helpers/vmalloc.c
> > +++ b/rust/helpers/vmalloc.c
> > @@ -2,9 +2,10 @@
> >  
> >  #include <linux/vmalloc.h>
> >  
> > -void * __must_check __realloc_size(2)
> > -rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
> > -				gfp_t flags, int node)
> > +__rust_helper void *__must_check __realloc_size(2)
> > +	rust_helper_vrealloc_node_align(const void *p, size_t size,
> 
> The indent here seems to be incorrect?

This is what I got from ClangFormat, but your suggestion does look
better, so I'll update it.

Alice

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 00/46] Allow inlining C helpers into Rust when using LTO
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (46 preceding siblings ...)
  2025-12-03  1:47 ` [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Boqun Feng
@ 2025-12-03 14:33 ` Gary Guo
  2025-12-04 10:05 ` (subset) " Christian Brauner
  48 siblings, 0 replies; 56+ messages in thread
From: Gary Guo @ 2025-12-03 14:33 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: rust-for-linux, linux-kernel, Greg Kroah-Hartman, Dave Ertman,
	Ira Weiny, Leon Romanovsky, Peter Zijlstra, Boqun Feng,
	Elle Rhumsaa, Carlos Llamas, Yury Norov, Andreas Hindborg,
	linux-block, FUJITA Tomonori, Miguel Ojeda, Michael Turquette,
	Stephen Boyd, linux-clk, Benno Lossin, Danilo Krummrich,
	Thomas Gleixner, Rafael J. Wysocki, Viresh Kumar, linux-pm,
	Paul Moore, Serge Hallyn, linux-security-module, Daniel Almeida,
	Abdiel Janulgue, Robin Murphy, Lyude Paul, Alexander Viro,
	Christian Brauner, Jan Kara, linux-fsdevel, Josh Poimboeuf,
	Jason Baron, Steven Rostedt, Ard Biesheuvel, Brendan Higgins,
	David Gow, Rae Moar, linux-kselftest, Andrew Morton,
	Liam R. Howlett, Andrew Ballance, maple-tree, linux-mm,
	Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool, Rob Herring,
	Saravana Kannan, devicetree, Bjorn Helgaas,
	Krzysztof Wilczyński, linux-pci, Remo Senekowitsch,
	Paul E. McKenney, rcu, Will Deacon, Fiona Behrens, Liam Girdwood,
	Mark Brown, Alexandre Courbot, Vlastimil Babka, Christoph Lameter,
	David Rientjes, Ingo Molnar, Waiman Long, Mitchell Levy,
	Frederic Weisbecker, Anna-Maria Behnsen, John Stultz, linux-usb,
	Tejun Heo, Lai Jiangshan, Matthew Wilcox, Tamir Duberstein

On Tue, 02 Dec 2025 19:37:24 +0000
Alice Ryhl <aliceryhl@google.com> 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.
> 
> These changes were generated by adding __rust_helper and running
> ClangFormat. Unrelated formatting changes were removed manually.
> 
> Why is __rust_helper needed?
> ============================
> 
> Currently, C helpers cannot be inlined into Rust even when using LTO
> because LLVM detects slightly different options on the codegen units.
> 
> * LLVM doesn't want to inline functions compiled with
>   `-fno-delete-null-pointer-checks` with code compiled without. The C
>   CGUs all have this enabled and Rust CGUs don't. Inlining is okay since
>   this is one of the hardening features that does not change the ABI,
>   and we shouldn't have null pointer dereferences in these helpers.
> 
> * LLVM doesn't want to inline functions with different list of builtins. C
>   side has `-fno-builtin-wcslen`; `wcslen` is not a Rust builtin, so
>   they should be compatible, but LLVM does not perform inlining due to
>   attributes mismatch.
> 
> * clang and Rust doesn't have the exact target string. Clang generates
>   `+cmov,+cx8,+fxsr` but Rust doesn't enable them (in fact, Rust will
>   complain if `-Ctarget-feature=+cmov,+cx8,+fxsr` is used). x86-64
>   always enable these features, so they are in fact the same target
>   string, but LLVM doesn't understand this and so inlining is inhibited.
>   This can be bypassed with `--ignore-tti-inline-compatible`, but this
>   is a hidden option.
> 
> (This analysis was written by Gary Guo.)
> 
> How is this fixed?
> ==================
> 
> To fix this we need to add __always_inline to all helpers when compiling
> with LTO. However, it should not be added when running bindgen as
> bindgen will ignore functions marked inline. To achieve this, we are
> using a #define called __rust_helper that is defined differently
> depending on whether bindgen is running or not.
> 
> Note that __rust_helper is currently always #defined to nothing.
> Changing it to __always_inline will happen separately in another patch
> series.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Alice Ryhl (46):
>       rust: auxiliary: add __rust_helper to helpers
>       rust: barrier: add __rust_helper to helpers
>       rust: binder: add __rust_helper to helpers
>       rust: bitmap: add __rust_helper to helpers
>       rust: bitops: add __rust_helper to helpers
>       rust: blk: add __rust_helper to helpers
>       rust: bug: add __rust_helper to helpers
>       rust: clk: add __rust_helper to helpers
>       rust: completion: add __rust_helper to helpers
>       rust: cpu: add __rust_helper to helpers
>       rust: cpufreq: add __rust_helper to helpers
>       rust: cpumask: add __rust_helper to helpers
>       rust: cred: add __rust_helper to helpers
>       rust: device: add __rust_helper to helpers
>       rust: dma: add __rust_helper to helpers
>       rust: drm: add __rust_helper to helpers
>       rust: err: add __rust_helper to helpers
>       rust: fs: add __rust_helper to helpers
>       rust: io: add __rust_helper to helpers
>       rust: irq: add __rust_helper to helpers
>       rust: jump_label: add __rust_helper to helpers
>       rust: kunit: 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: pci: add __rust_helper to helpers
>       rust: pid_namespace: add __rust_helper to helpers
>       rust: platform: add __rust_helper to helpers
>       rust: poll: add __rust_helper to helpers
>       rust: processor: add __rust_helper to helpers
>       rust: property: add __rust_helper to helpers
>       rust: rbtree: add __rust_helper to helpers
>       rust: rcu: add __rust_helper to helpers
>       rust: refcount: add __rust_helper to helpers
>       rust: regulator: add __rust_helper to helpers
>       rust: scatterlist: add __rust_helper to helpers
>       rust: security: add __rust_helper to helpers
>       rust: slab: 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: uaccess: add __rust_helper to helpers
>       rust: usb: add __rust_helper to helpers
>       rust: wait: add __rust_helper to helpers
>       rust: workqueue: add __rust_helper to helpers
>       rust: xarray: add __rust_helper to helpers

Thansk for sending this Alice! With this series in first, my series for
inlining helpers should be much easier to apply.

For the whole series:

Reviewed-by: Gary Guo <gary@garyguo.net>

Best,
Gary


> 
>  rust/helpers/auxiliary.c     |  6 +++--
>  rust/helpers/barrier.c       |  6 ++---
>  rust/helpers/binder.c        | 13 ++++-----
>  rust/helpers/bitmap.c        |  6 +++--
>  rust/helpers/bitops.c        | 11 +++++---
>  rust/helpers/blk.c           |  4 +--
>  rust/helpers/bug.c           |  4 +--
>  rust/helpers/build_bug.c     |  2 +-
>  rust/helpers/clk.c           | 24 +++++++++--------
>  rust/helpers/completion.c    |  2 +-
>  rust/helpers/cpu.c           |  2 +-
>  rust/helpers/cpufreq.c       |  3 ++-
>  rust/helpers/cpumask.c       | 32 +++++++++++++---------
>  rust/helpers/cred.c          |  4 +--
>  rust/helpers/device.c        | 16 +++++------
>  rust/helpers/dma.c           | 15 ++++++-----
>  rust/helpers/drm.c           |  7 ++---
>  rust/helpers/err.c           |  6 ++---
>  rust/helpers/fs.c            |  2 +-
>  rust/helpers/io.c            | 64 +++++++++++++++++++++++---------------------
>  rust/helpers/irq.c           |  6 +++--
>  rust/helpers/jump_label.c    |  2 +-
>  rust/helpers/kunit.c         |  2 +-
>  rust/helpers/maple_tree.c    |  3 ++-
>  rust/helpers/mm.c            | 20 +++++++-------
>  rust/helpers/mutex.c         | 13 ++++-----
>  rust/helpers/of.c            |  2 +-
>  rust/helpers/page.c          |  9 ++++---
>  rust/helpers/pci.c           | 13 +++++----
>  rust/helpers/pid_namespace.c |  8 +++---
>  rust/helpers/platform.c      |  2 +-
>  rust/helpers/poll.c          |  5 ++--
>  rust/helpers/processor.c     |  2 +-
>  rust/helpers/property.c      |  2 +-
>  rust/helpers/rbtree.c        |  5 ++--
>  rust/helpers/rcu.c           |  4 +--
>  rust/helpers/refcount.c      | 10 +++----
>  rust/helpers/regulator.c     | 24 ++++++++++-------
>  rust/helpers/scatterlist.c   | 12 +++++----
>  rust/helpers/security.c      | 26 ++++++++++--------
>  rust/helpers/signal.c        |  2 +-
>  rust/helpers/slab.c          | 14 +++++-----
>  rust/helpers/spinlock.c      | 13 ++++-----
>  rust/helpers/sync.c          |  4 +--
>  rust/helpers/task.c          | 24 ++++++++---------
>  rust/helpers/time.c          | 12 ++++-----
>  rust/helpers/uaccess.c       |  8 +++---
>  rust/helpers/usb.c           |  3 ++-
>  rust/helpers/vmalloc.c       |  7 ++---
>  rust/helpers/wait.c          |  2 +-
>  rust/helpers/workqueue.c     |  8 +++---
>  rust/helpers/xarray.c        | 10 +++----
>  52 files changed, 280 insertions(+), 226 deletions(-)
> ---
> base-commit: 54e3eae855629702c566bd2e130d9f40e7f35bde
> change-id: 20251202-define-rust-helper-f7b531813007
> 
> Best regards,


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: (subset) [PATCH 00/46] Allow inlining C helpers into Rust when using LTO
  2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
                   ` (47 preceding siblings ...)
  2025-12-03 14:33 ` Gary Guo
@ 2025-12-04 10:05 ` Christian Brauner
  48 siblings, 0 replies; 56+ messages in thread
From: Christian Brauner @ 2025-12-04 10:05 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: Christian Brauner, linux-kernel, Greg Kroah-Hartman, Dave Ertman,
	Ira Weiny, Leon Romanovsky, Peter Zijlstra, Boqun Feng,
	Elle Rhumsaa, Carlos Llamas, Yury Norov, Andreas Hindborg,
	linux-block, FUJITA Tomonori, Miguel Ojeda, Michael Turquette,
	Stephen Boyd, linux-clk, Benno Lossin, Danilo Krummrich,
	Thomas Gleixner, Rafael J. Wysocki, Viresh Kumar, linux-pm,
	Paul Moore, Serge Hallyn, linux-security-module, Daniel Almeida,
	Abdiel Janulgue, Robin Murphy, Lyude Paul, Alexander Viro,
	Jan Kara, linux-fsdevel, Josh Poimboeuf, Jason Baron,
	Steven Rostedt, Ard Biesheuvel, Brendan Higgins, David Gow,
	linux-kselftest, Andrew Morton, Liam R. Howlett, Andrew Ballance,
	maple-tree, linux-mm, Lorenzo Stoakes, Uladzislau Rezki,
	Vitaly Wool, Rob Herring, Saravana Kannan, devicetree,
	Bjorn Helgaas, Krzysztof Wilczyński, linux-pci,
	Remo Senekowitsch, Paul E. McKenney, rcu, Will Deacon,
	Fiona Behrens, Gary Guo, Liam Girdwood, Mark Brown,
	Alexandre Courbot, Vlastimil Babka, Christoph Lameter,
	David Rientjes, Ingo Molnar, Waiman Long, Mitchell Levy,
	Frederic Weisbecker, Anna-Maria Behnsen, John Stultz, linux-usb,
	Tejun Heo, Lai Jiangshan, Matthew Wilcox, Tamir Duberstein,
	Rae Moar, rust-for-linux

On Tue, 02 Dec 2025 19:37:24 +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.
> 
> These changes were generated by adding __rust_helper and running
> ClangFormat. Unrelated formatting changes were removed manually.
> 
> [...]

Applied to the vfs-6.20.rust branch of the vfs/vfs.git tree.
Patches in the vfs-6.20.rust branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.20.rust

[18/46] rust: fs: add __rust_helper to helpers
        https://git.kernel.org/vfs/vfs/c/02c444cc60e5
[27/46] rust: pid_namespace: add __rust_helper to helpers
        https://git.kernel.org/vfs/vfs/c/f28a178408e4
[29/46] rust: poll: add __rust_helper to helpers
        https://git.kernel.org/vfs/vfs/c/de98ed59d678

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PATCH 23/46] rust: maple_tree: add __rust_helper to helpers
  2025-12-02 19:37 ` [PATCH 23/46] rust: maple_tree: " Alice Ryhl
@ 2025-12-04 21:07   ` Andrew Ballance
  0 siblings, 0 replies; 56+ messages in thread
From: Andrew Ballance @ 2025-12-04 21:07 UTC (permalink / raw)
  To: Alice Ryhl, rust-for-linux
  Cc: linux-kernel, Andrew Morton, Liam R. Howlett, maple-tree,
	linux-mm

On 12/2/25 1:37 PM, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
> Cc: Andrew Ballance <andrewjballance@gmail.com>
> Cc: maple-tree@lists.infradead.org
> Cc: linux-mm@kvack.org
> ---
>   rust/helpers/maple_tree.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/rust/helpers/maple_tree.c b/rust/helpers/maple_tree.c
> index 1dd9ac84a13feed53c0ed5eec6805517081d0673..5586486a76e0de60969af1510b4b0428392920e6 100644
> --- a/rust/helpers/maple_tree.c
> +++ b/rust/helpers/maple_tree.c
> @@ -2,7 +2,8 @@
>   
>   #include <linux/maple_tree.h>
>   
> -void rust_helper_mt_init_flags(struct maple_tree *mt, unsigned int flags)
> +__rust_helper void rust_helper_mt_init_flags(struct maple_tree *mt,
> +					     unsigned int flags)
>   {
>   	mt_init_flags(mt, flags);
>   }
> 

Acked-by: Andrew Ballance <andrewjballance@gmail.com>


^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2025-12-04 21:07 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-02 19:37 [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Alice Ryhl
2025-12-02 19:37 ` [PATCH 01/46] rust: auxiliary: add __rust_helper to helpers Alice Ryhl
2025-12-02 19:37 ` [PATCH 02/46] rust: barrier: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 03/46] rust: binder: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 04/46] rust: bitmap: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 05/46] rust: bitops: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 06/46] rust: blk: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 07/46] rust: bug: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 08/46] rust: clk: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 09/46] rust: completion: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 10/46] rust: cpu: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 11/46] rust: cpufreq: " Alice Ryhl
2025-12-03  5:48   ` Viresh Kumar
2025-12-02 19:37 ` [PATCH 12/46] rust: cpumask: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 13/46] rust: cred: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 14/46] rust: device: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 15/46] rust: dma: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 16/46] rust: drm: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 17/46] rust: err: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 18/46] rust: fs: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 19/46] rust: io: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 20/46] rust: irq: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 21/46] rust: jump_label: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 22/46] rust: kunit: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 23/46] rust: maple_tree: " Alice Ryhl
2025-12-04 21:07   ` Andrew Ballance
2025-12-02 19:37 ` [PATCH 24/46] rust: mm: " Alice Ryhl
2025-12-03  1:43   ` Boqun Feng
2025-12-03  9:03     ` Alice Ryhl
2025-12-02 19:37 ` [PATCH 25/46] rust: of: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 26/46] rust: pci: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 27/46] rust: pid_namespace: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 28/46] rust: platform: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 29/46] rust: poll: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 30/46] rust: processor: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 31/46] rust: property: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 32/46] rust: rbtree: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 33/46] rust: rcu: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 34/46] rust: refcount: " Alice Ryhl
2025-12-02 19:37 ` [PATCH 35/46] rust: regulator: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 36/46] rust: scatterlist: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 37/46] rust: security: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 38/46] rust: slab: " Alice Ryhl
2025-12-03  1:45   ` Boqun Feng
2025-12-03  9:03     ` Alice Ryhl
2025-12-02 19:38 ` [PATCH 39/46] rust: sync: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 40/46] rust: task: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 41/46] rust: time: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 42/46] rust: uaccess: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 43/46] rust: usb: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 44/46] rust: wait: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 45/46] rust: workqueue: " Alice Ryhl
2025-12-02 19:38 ` [PATCH 46/46] rust: xarray: " Alice Ryhl
2025-12-03  1:47 ` [PATCH 00/46] Allow inlining C helpers into Rust when using LTO Boqun Feng
2025-12-03 14:33 ` Gary Guo
2025-12-04 10:05 ` (subset) " Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).