linux/rust
Linus Torvalds f59c074e76 Rust fixes for v7.3
Toolchain and infrastructure:
 
  - Fix KCFI failures, such as in Rust doctests, by disabling function
    merging when CFI is enabled. Gary reported the LLVM bug to upstream
    and it is now fixed in their mainline.
 
  - Fix 'objtool' fallthrough warnings under the experimental
    'CONFIG_RUST_INLINE_HELPERS' by passing (for the combined Rust and
    helpers code) the LLVM options needed to preserve the unreachable
    traps that 'rustc' normally emits.
 
    In addition, fix 'objtool' errors when LTO is enabled on top, by
    also filtering out the LTO flags (for the combined Rust and helpers
    code) so that the traps are kept in place.
 
  - Fix 'objtool' warnings by adding one more 'noreturn' function.
 
  - Fix 'make rusttest' target when the 'rustc-dev' component is
    installed and Rust >= 1.82.0, <= 1.87.0 is used.
 
 'kernel' crate:
 
  - 'num' module: fix soundness issue in the 'Bounded' conversion from
    'bool' by restricting the conversions to unsigned 'Bounded'.
 
  - 'jump_label' module: fix future 'make rusttest' target failures when
    'ARCH=' is set to an arch different than the host's.
 
  - 'list' module: fix incorrect 'pop_back()' comment.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmqT+BIACgkQGXyLc2ht
 IW0vRRAAmR1E04gT5HFDH+iNJgLlyticVsHs0rH46ICYgQWs+gpGGiJsPpnNBJxM
 M5+VGauMPch5kIBKYwD/XrUe6cDDNqIfY8Eq+BnJiTxDe6U68K4cSnmPe478wZIn
 15AIteCHN2x9vf49KpfI3fH/xoriS5XVEC915bQ9APXOYJv7iXZCFDzxw9dXnYu/
 TE3YleA32oJ9COBT3s8ovtzNpEOtZPKhWFd2lOCaGbxBLWygu5X/PSEZs6ikmqgR
 BqHrbhzSco8aYKCrbFbQrdgtwFPr3PQ8pRn44TPU6/siZNVBk83IpcxdtXrQ2gRi
 wOwZfMsH2K/cEZWMXPz16hp+4onWUr1bgkfLUAzPtyqUX6rOEaBrliSXGs+yCl40
 KNx5BefrhzH6UL+/pbLGVXzC5q1VLTsgS6u66piUyvhf52Wmvzc7AExGml/BWA/q
 jomwnxpgLiBjO61cH4dnfrm3AtXHAWGzG/dd0BnVcpT+8HEr2W4WWRSydmPtkB+f
 hXXmwAOF3sgVueJ2nxlPVcqt3LdsinCwBrQQmO8J+TtPyNW9sh72OfFSOkF/wybw
 o5tcqFG7ZSNGR7pli5pYsnG4Gfv3vIraLwhiVciGXZ+es+FkKtOpaOMunUcQwKP6
 +uFpdMqXVQmH4l3Adc0rG1lq6zRHnGvZ96R5PlmPhl6RVDZuv0E=
 =EBLX
 -----END PGP SIGNATURE-----

Merge tag 'rust-fixes-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull Rust fixes from Miguel Ojeda:
 "Toolchain and infrastructure:

   - Fix KCFI failures, such as in Rust doctests, by disabling function
     merging when CFI is enabled. Gary reported the LLVM bug to upstream
     and it is now fixed in their mainline.

   - Fix 'objtool' fallthrough warnings under the experimental
     'CONFIG_RUST_INLINE_HELPERS' by passing (for the combined Rust and
     helpers code) the LLVM options needed to preserve the unreachable
     traps that 'rustc' normally emits.

     In addition, fix 'objtool' errors when LTO is enabled on top, by
     also filtering out the LTO flags (for the combined Rust and helpers
     code) so that the traps are kept in place.

   - Fix 'objtool' warnings by adding one more 'noreturn' function.

   - Fix 'make rusttest' target when the 'rustc-dev' component is
     installed and Rust >= 1.82.0, <= 1.87.0 is used.

  'kernel' crate:

   - 'num' module: fix soundness issue in the 'Bounded' conversion from
     'bool' by restricting the conversions to unsigned 'Bounded'.

   - 'jump_label' module: fix future 'make rusttest' target failures
     when 'ARCH=' is set to an arch different than the host's.

   - 'list' module: fix incorrect 'pop_back()' comment"

* tag 'rust-fixes-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: kbuild: disambiguate `zerocopy_derive` for `rusttest`
  rust: num: restrict bool conversion to unsigned Bounded
  kbuild: rust: keep Rust objects out of Clang LTO with inline helpers
  kbuild: rust: preserve unreachable traps with inline helpers
  rust: cfi: disable function merging if CFI is enabled
  rust: jump_label: skip arch-specific asm in `testlib` builds
  objtool/rust: add one more `noreturn` Rust function
  rust: kernel: list: fix incorrect pop_back example comment
2026-08-30 09:47:39 -07:00
..
bindings Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
helpers Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
kernel Rust fixes for v7.3 2026-08-30 09:47:39 -07:00
macros Modules changes for 7.3-rc1 2026-08-21 12:47:25 -07:00
pin-init rust: pin-init: add #[inline] to small functions 2026-08-05 11:36:18 +01:00
proc-macro2 rust: proc-macro2: rebuild if the version text changes 2026-01-23 10:44:27 +01:00
quote rust: quote: add README.md 2025-11-24 17:15:43 +01:00
syn rust: syn: add README.md 2025-11-24 17:15:47 +01:00
uapi Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
zerocopy rust: zerocopy: update to v0.8.54 2026-07-11 13:46:02 +02:00
zerocopy-derive rust: zerocopy: update to v0.8.54 2026-07-11 13:46:02 +02:00
.gitignore
.kunitconfig rust: add kunitconfig 2025-03-19 23:22:21 +01:00
bindgen_parameters rust/bindgen_parameters: Mark s390 types as opaque to prevent repr conflicts 2026-06-10 16:25:13 +02:00
build_error.rs
compiler_builtins.rs rust: Make __udivdi3() and __umoddi3() panic 2026-07-31 16:57:48 +05:30
exports.c kbuild: rust: provide an option to inline C helpers into Rust 2026-03-30 02:03:52 +02:00
ffi.rs rust: replace CStr with core::ffi::CStr 2025-10-22 07:47:27 +02:00
Makefile Rust fixes for v7.3 2026-08-30 09:47:39 -07:00