Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull rust fixes from Miguel Ojeda:

- Fix/workaround a couple Rust 1.91.0 build issues when sanitizers are
enabled due to extra checking performed by the compiler and an
upstream issue already fixed for Rust 1.93.0

- Fix future Rust 1.93.0 builds by supporting the stabilized name for
the 'no-jump-tables' flag

- Fix a couple private/broken intra-doc links uncovered by the future
move of pin-init to 'syn'

* tag 'rust-fixes-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: treat `build_error` and `rustdoc` as kernel objects
rust: condvar: fix broken intra-doc link
rust: devres: fix private intra-doc link

+18 -5
+1 -1
arch/loongarch/Makefile
··· 109 109 ifdef CONFIG_RUSTC_HAS_ANNOTATE_TABLEJUMP 110 110 KBUILD_RUSTFLAGS += -Cllvm-args=--loongarch-annotate-tablejump 111 111 else 112 - KBUILD_RUSTFLAGS += -Zno-jump-tables # keep compatibility with older compilers 112 + KBUILD_RUSTFLAGS += $(if $(call rustc-min-version,109300),-Cjump-tables=n,-Zno-jump-tables) # keep compatibility with older compilers 113 113 endif 114 114 ifdef CONFIG_LTO_CLANG 115 115 # The annotate-tablejump option can not be passed to LLVM backend when LTO is enabled.
+1 -1
arch/x86/Makefile
··· 98 98 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816 99 99 # 100 100 KBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables) 101 - KBUILD_RUSTFLAGS += -Zcf-protection=branch -Zno-jump-tables 101 + KBUILD_RUSTFLAGS += -Zcf-protection=branch $(if $(call rustc-min-version,109300),-Cjump-tables=n,-Zno-jump-tables) 102 102 else 103 103 KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) 104 104 endif
+14 -1
rust/Makefile
··· 69 69 # the time being (https://github.com/rust-lang/rust/issues/144521). 70 70 rustdoc_modifiers_workaround := $(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18) 71 71 72 + # Similarly, for doctests (https://github.com/rust-lang/rust/issues/146465). 73 + doctests_modifiers_workaround := $(rustdoc_modifiers_workaround)$(if $(call rustc-min-version,109100),$(comma)sanitizer) 74 + 72 75 # `rustc` recognizes `--remap-path-prefix` since 1.26.0, but `rustdoc` only 73 76 # since Rust 1.81.0. Moreover, `rustdoc` ICEs on out-of-tree builds since Rust 74 77 # 1.82.0 (https://github.com/rust-lang/rust/issues/138520). Thus workaround both ··· 130 127 rustdoc-core: $(RUST_LIB_SRC)/core/src/lib.rs rustdoc-clean FORCE 131 128 +$(call if_changed,rustdoc) 132 129 130 + # Even if `rustdoc` targets are not kernel objects, they should still be 131 + # treated as such so that we pass the same flags. Otherwise, for instance, 132 + # `rustdoc` will complain about missing sanitizer flags causing an ABI mismatch. 133 + rustdoc-compiler_builtins: private is-kernel-object := y 133 134 rustdoc-compiler_builtins: $(src)/compiler_builtins.rs rustdoc-core FORCE 134 135 +$(call if_changed,rustdoc) 135 136 137 + rustdoc-ffi: private is-kernel-object := y 136 138 rustdoc-ffi: $(src)/ffi.rs rustdoc-core FORCE 137 139 +$(call if_changed,rustdoc) 138 140 ··· 155 147 rustdoc-macros FORCE 156 148 +$(call if_changed,rustdoc) 157 149 150 + rustdoc-kernel: private is-kernel-object := y 158 151 rustdoc-kernel: private rustc_target_flags = --extern ffi --extern pin_init \ 159 152 --extern build_error --extern macros \ 160 153 --extern bindings --extern uapi ··· 239 230 --extern bindings --extern uapi \ 240 231 --no-run --crate-name kernel -Zunstable-options \ 241 232 --sysroot=/dev/null \ 242 - $(rustdoc_modifiers_workaround) \ 233 + $(doctests_modifiers_workaround) \ 243 234 --test-builder $(objtree)/scripts/rustdoc_test_builder \ 244 235 $< $(rustdoc_test_kernel_quiet); \ 245 236 $(objtree)/scripts/rustdoc_test_gen ··· 531 522 $(obj)/$(libpin_init_internal_name) $(obj)/$(libmacros_name) FORCE 532 523 +$(call if_changed_rule,rustc_library) 533 524 525 + # Even if normally `build_error` is not a kernel object, it should still be 526 + # treated as such so that we pass the same flags. Otherwise, for instance, 527 + # `rustc` will complain about missing sanitizer flags causing an ABI mismatch. 528 + $(obj)/build_error.o: private is-kernel-object := y 534 529 $(obj)/build_error.o: private skip_gendwarfksyms = 1 535 530 $(obj)/build_error.o: $(src)/build_error.rs $(obj)/compiler_builtins.o FORCE 536 531 +$(call if_changed_rule,rustc_library)
+1 -1
rust/kernel/devres.rs
··· 103 103 /// 104 104 /// # Invariants 105 105 /// 106 - /// [`Self::inner`] is guaranteed to be initialized and is always accessed read-only. 106 + /// `Self::inner` is guaranteed to be initialized and is always accessed read-only. 107 107 #[pin_data(PinnedDrop)] 108 108 pub struct Devres<T: Send> { 109 109 dev: ARef<Device>,
+1 -1
rust/kernel/sync/condvar.rs
··· 36 36 /// spuriously. 37 37 /// 38 38 /// Instances of [`CondVar`] need a lock class and to be pinned. The recommended way to create such 39 - /// instances is with the [`pin_init`](crate::pin_init!) and [`new_condvar`] macros. 39 + /// instances is with the [`pin_init`](pin_init::pin_init!) and [`new_condvar`] macros. 40 40 /// 41 41 /// # Examples 42 42 ///