Rust fixes for 7.2 (2nd)
Miguel Ojeda
maintainerHi Linus,
Please pull these fixes for Rust.
They have been in linux-next for at least four rounds (most for more than a week).
No conflicts expected.
Thanks!
Cheers,
Miguel
The following changes since commit dc59e4fea9d83f03bad6bddf3fa2e52491777482:
Linux 7.2-rc1 (2026-06-28 12:01:31 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.2-2
for you to fetch changes up to 880c43b185ca52239e75bc546cc4f4d9154d0fed:
rust: time: fix as_micros_ceil() to round correctly for negative Delta (2026-07-18 19:07:35 +0200)
----------------------------------------------------------------
Rust fixes for v7.2 (2nd)
Toolchain and infrastructure:
- 'zerocopy' crates: update to v0.8.54 to fix a modpost error under 'CONFIG_CC_OPTIMIZE_FOR_SIZE=y'.
There are actually two updates in the PR: the one to v0.8.52 is fairly large and was originally not intended for a fixes PR, but the actual fix landed in the v0.8.54 one. Thus I included both here.
The v0.8.52 update includes two things upstream added for us:
'--cfg no_fp_fmt_parse' to avoid a local workaround, and the new 'most_traits' feature.
The good news is that, after these updates, the delta with upstream is now trivial: only an identifier prefix change and the SPDX parentheses.
- Fix an objtool warning by adding one more 'noreturn' function for Rust 1.99.0 (expected 2026-10-01).
- Clean up new 'semicolon_in_expressions_from_macros' lint errors for Rust 1.99.0 (expected 2026-10-01). The lint can be allowed, but it will be a hard error at some point in the future anyway, so clean it up now.
- Locally allow new 'suspicious_runtime_symbol_definitions' lint for Rust 1.98.0 (expected 2026-08-20).
- Globally allow 'clippy::unwrap_or_default' lint since it relies on optimizations -- under 'CONFIG_CC_OPTIMIZE_FOR_SIZE=y' it does not work well.
'kernel' crate:
- 'time' module: fix 'Delta::as_micros_ceil()' to round negative values correctly.
----------------------------------------------------------------
Alexandre Courbot (1):
rust: allow clippy::unwrap_or_default globally
Alice Ryhl (1):
rust: device: avoid trailing ; in printing macros
FUJITA Tomonori (1):
rust: time: fix as_micros_ceil() to round correctly for negative Delta
Miguel Ojeda (4):
rust: allow suspicious_runtime_symbol_definitions lint for Rust >= 1.98
rust: zerocopy: update to v0.8.52
rust: zerocopy: update to v0.8.54
objtool/rust: add one more noreturn Rust function for Rust 1.99.0
Makefile | 5 +++ init/Kconfig | 3 ++ rust/Makefile | 16 +++++++-- rust/bindings/lib.rs | 4 +++ rust/kernel/device.rs | 20 +++++------ rust/kernel/time.rs | 11 ++++-- rust/uapi/lib.rs | 4 +++ rust/zerocopy-derive/README.md | 14 ++++---- rust/zerocopy-derive/derive/from_bytes.rs | 2 +- rust/zerocopy-derive/derive/into_bytes.rs | 2 +- rust/zerocopy-derive/derive/known_layout.rs | 3 +- rust/zerocopy-derive/derive/mod.rs | 20 ++++++----- rust/zerocopy-derive/derive/try_from_bytes.rs | 6 ++-- rust/zerocopy-derive/derive/unaligned.rs | 2 +- rust/zerocopy-derive/lib.rs | 36 ++++++++++++++++++- rust/zerocopy-derive/repr.rs | 2 +- rust/zerocopy-derive/util.rs | 34 +++++++++++++----- rust/zerocopy/README.md | 15 ++++---- rust/zerocopy/rustdoc/style.css | 1 - rust/zerocopy/src/byte_slice.rs | 2 +- rust/zerocopy/src/byteorder.rs | 50 ++++++++++++++++++++++----- rust/zerocopy/src/deprecated.rs | 2 +- rust/zerocopy/src/error.rs | 2 +- rust/zerocopy/src/impls.rs | 4 +-- rust/zerocopy/src/layout.rs | 4 ++- rust/zerocopy/src/lib.rs | 12 ++++--- rust/zerocopy/src/macros.rs | 2 +- rust/zerocopy/src/pointer/inner.rs | 2 +- rust/zerocopy/src/pointer/invariant.rs | 2 +- rust/zerocopy/src/pointer/mod.rs | 2 +- rust/zerocopy/src/pointer/ptr.rs | 2 +- rust/zerocopy/src/pointer/transmute.rs | 2 +- rust/zerocopy/src/ref.rs | 2 +- rust/zerocopy/src/split_at.rs | 2 +- rust/zerocopy/src/util/macro_util.rs | 2 +- rust/zerocopy/src/util/macros.rs | 2 +- rust/zerocopy/src/util/mod.rs | 8 ++++- rust/zerocopy/src/wrappers.rs | 2 +- tools/objtool/check.c | 1 + 39 files changed, 217 insertions(+), 90 deletions(-)
The pull request you sent on Sat, 25 Jul 2026 18:53:01 +0200:
The pull request you sent on Sat, 25 Jul 2026 18:53:01 +0200:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git tags/rust-fixes-7.2-2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3dab139d4795f688e4f243e40c7474df00d329d9
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html