Rust fixes for 7.4
Miguel Ojeda
maintainerHi Linus,
Please pull these fixes for Rust.
They have been in linux-next for a week.
There is a trivial conflict -- the resolution in linux-next is good.
Thanks!
Cheers,
Miguel
The following changes since commit c03c1a14507dfaf8b856c2608f9ac216021fc222:
Linux 7.3 (2026-10-18 13:14:58 -1000)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.4
for you to fetch changes up to 7d109178cd644268326cd31702ed46c7ac8bb300:
rust: dma: declare cfi_encoding for dma_data_direction (2026-10-22 15:36:01 +0200)
----------------------------------------------------------------
Rust fixes for v7.4
Toolchain and infrastructure:
- Fix 'objtool' warnings for the upcoming Rust 1.101.0 (expected 2026-12-24) by adding one more 'noreturn' function.
'kernel' crate:
- Fix KCFI failures on every call from C to Rust IRQ handlers and 'hrtimer' callbacks by giving the C enum bindings the correct 'cfi_encoding'. Also prevent the same issue for DMA callbacks taking 'dma_data_direction'.
- 'workqueue' module: fix a runtime warning when queueing work on the deprecated 'system_wq' by switching to 'system_{percpu,dfl}_wq'.
----------------------------------------------------------------
Danilo Krummrich (1):
rust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wq
Miguel Ojeda (1):
objtool/rust: add one more noreturn Rust function for Rust 1.101.0
Sami Tolvanen (3):
rust: irq: declare cfi_encoding for irqreturn
rust: hrtimer: declare cfi_encoding for hrtimer_restart
rust: dma: declare cfi_encoding for dma_data_direction
Documentation/rust/testing.rst | 2 +- Documentation/translations/zh_CN/rust/testing.rst | 2 +- drivers/android/binder/process.rs | 4 +- rust/bindgen_parameters | 6 +++ rust/kernel/dma.rs | 21 ++++----- rust/kernel/irq/request.rs | 28 +++++++----- rust/kernel/sync/completion.rs | 2 +- rust/kernel/sync/lock/spinlock.rs | 2 +- rust/kernel/time/hrtimer.rs | 6 +-- rust/kernel/workqueue.rs | 52 ++++++++++++----------- tools/objtool/check.c | 1 + 11 files changed, 71 insertions(+), 55 deletions(-)
Quoted 5 lines · Miguel Ojeda
- Fix KCFI failures on every call from C to Rust IRQ handlers and 'hrtimer' callbacks by giving the C enum bindings the correct '
cfi_encoding'. Also prevent the same issue for DMA callbacks taking 'dma_data_direction'.
Bah. Is there no way to just get bindgen to do this automatically for all enums? Would that break something else?
Linus
Quoted 3 lines · Linus Torvalds
Bah. Is there no way to just get bindgen to do this automatically for all enums? Would that break something else?
We want exactly that, i.e. for bindgen to do it (among other things in our "wishlist"). It shouldn't be a hard one to do, and there is a related, open PR (though slightly different).
There are a few months until the next minimum version cut (Debian Stable), so we can try to land it.
Emilio (the maintainer, Cc'd) is open to improvements and helps us when possible / within his bandwidth, so we will see.
Cheers,
Miguel
Quoted 3 lines · Miguel Ojeda
Emilio (the maintainer, Cc'd) is open to improvements and helps us when possible / within his bandwidth, so we will see.
And by this I don't mean that Emilio has to do it, of course, i.e. I just meant to land it.
Cheers,
Miguel
The pull request you sent on Thu, 29 Oct 2026 19:01:16 +0100:
The pull request you sent on Thu, 29 Oct 2026 19:01:16 +0100:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.4
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/fb7bd3a2aad70a76232a7168a505386d0a1396af
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html