Skip to contentSkip to conversation

Rust fixes for 7.4 (4th)

GIT PULL Merged Miguel Ojeda 2 participants 2 messages Nov 22 Rust

lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

Hi Linus,

Please pull these fixes for Rust.

They have been in linux-next for two rounds or more.

No conflicts expected.

Thanks!

Cheers,
Miguel

The following changes since commit aebb7274476403040d582c61478df8f4a7bf9cd3:

Linux 7.4-rc3 (2026-11-15 14:30:11 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.4-4

for you to fetch changes up to 73bdf8773de4af2c2b7f49370191ae6d5aeddea5:

kbuild: rust: disable function merging unconditionally (2026-11-19 11:28:42 +0100)

----------------------------------------------------------------
Rust fixes for v7.4 (4th)

Toolchain and infrastructure:

- Disable function merging in all cases to fix broken MODVERSIONS information with gendwarfksyms, wrong backtraces and possibly issues with pahole/BTF due to lost debug information.

- x86: emit the expected 'cs' prefix for RETPOLINE builds by passing the '-Zindirect-branch-cs-prefix' flag we added to 'rustc', which fixes boot failures (with 'spectre_v2=retpoline,lfence') and code corruption (with paranoid FineIBT).

- Fix objtool warnings for the upcoming Rust 1.101.0 (expected 2026-12-24) by adding more 'noreturn' functions.

'kernel' crate:

- 'str' module: fix soundness issue in 'Formatter::new()' by tying the returned formatter to the lifetime of its backing buffer.

- 'iov' module: fix soundness issue in 'copy_from_iter_raw()' by tying the returned slice to the lifetime of the output buffer.

I suggested upstream Rust to introduce a lint for this case of the lifetime elision rule, to avoid repeating this sort of mistake.

----------------------------------------------------------------
Alice Ryhl (1):
kbuild: rust: disable function merging unconditionally

Marwan Mohamed Zein (1):
rust: iov: fix return lifetime of copy_from_iter_raw()

Miguel Ojeda (2):
objtool/rust: add more noreturn Rust functions for Rust 1.101.0 x86/rust: use -Zindirect-branch-cs-prefix for RETPOLINE builds

Peder Bergan (1):
rust: str: tie Formatter to its backing buffer

 Makefile              | 4 ++--
 arch/x86/Makefile     | 1 +
 rust/Makefile         | 2 +-
 rust/kernel/iov.rs    | 2 +-
 rust/kernel/str.rs    | 4 ++--
 tools/objtool/check.c | 4 ++++
 6 files changed, 11 insertions(+), 6 deletions(-)
merge bot Merged
#1 lore raw
The pull request you sent on Sun, 22 Nov 2026 13:25:25 +0100:

The pull request you sent on Sun, 22 Nov 2026 13:25:25 +0100:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.4-4

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2dc60bd9975fc8666a13d58410499e06e6799ba9

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html