Commit 6c5b3e30 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'rust-fixes-6.11-2' of https://github.com/Rust-for-Linux/linux

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

   - Fix builds for nightly compiler users now that 'new_uninit' was
     split into new features by using an alternative approach for the
     code that used what is now called the 'box_uninit_write' feature

   - Allow the 'stable_features' lint to preempt upcoming warnings about
     them, since soon there will be unstable features that will become
     stable in nightly compilers

   - Export bss symbols too

  'kernel' crate:

   - 'block' module: fix wrong usage of lockdep API

  'macros' crate:

   - Provide correct provenance when constructing 'THIS_MODULE'

  Documentation:

   - Remove unintended indentation (blockquotes) in generated output

   - Fix a couple typos

  MAINTAINERS:

   - Remove Wedson as Rust maintainer

   - Update Andreas' email"

* tag 'rust-fixes-6.11-2' of https://github.com/Rust-for-Linux/linux:
  MAINTAINERS: update Andreas Hindborg's email address
  MAINTAINERS: Remove Wedson as Rust maintainer
  rust: macros: provide correct provenance when constructing THIS_MODULE
  rust: allow `stable_features` lint
  docs: rust: remove unintended blockquote in Quick Start
  rust: alloc: eschew `Box<MaybeUninit<T>>::write`
  rust: kernel: fix typos in code comments
  docs: rust: remove unintended blockquote in Coding Guidelines
  rust: block: fix wrong usage of lockdep API
  rust: kbuild: fix export of bss symbols
parents e4b42053 cff56ff7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ Amit Nischal <quic_anischal@quicinc.com> <anischal@codeaurora.org>
Andi Kleen <ak@linux.intel.com> <ak@suse.de>
Andi Shyti <andi@etezian.org> <andi.shyti@samsung.com>
Andreas Herrmann <aherrman@de.ibm.com>
Andreas Hindborg <a.hindborg@kernel.org> <a.hindborg@samsung.com>
Andrej Shadura <andrew.shadura@collabora.co.uk>
Andrej Shadura <andrew@shadura.me> <andrew@beldisplaytech.com>
Andrew Morton <akpm@linux-foundation.org>
+2 −3
Original line number Diff line number Diff line
@@ -3868,7 +3868,7 @@ F: kernel/trace/blktrace.c
F:	lib/sbitmap.c
BLOCK LAYER DEVICE DRIVER API [RUST]
M:	Andreas Hindborg <a.hindborg@samsung.com>
M:	Andreas Hindborg <a.hindborg@kernel.org>
R:	Boqun Feng <boqun.feng@gmail.com>
L:	linux-block@vger.kernel.org
L:	rust-for-linux@vger.kernel.org
@@ -19932,12 +19932,11 @@ F: tools/verification/
RUST
M:	Miguel Ojeda <ojeda@kernel.org>
M:	Alex Gaynor <alex.gaynor@gmail.com>
M:	Wedson Almeida Filho <wedsonaf@gmail.com>
R:	Boqun Feng <boqun.feng@gmail.com>
R:	Gary Guo <gary@garyguo.net>
R:	Björn Roy Baron <bjorn3_gh@protonmail.com>
R:	Benno Lossin <benno.lossin@proton.me>
R:	Andreas Hindborg <a.hindborg@samsung.com>
R:	Andreas Hindborg <a.hindborg@kernel.org>
R:	Alice Ryhl <aliceryhl@google.com>
L:	rust-for-linux@vger.kernel.org
S:	Supported
+1 −0
Original line number Diff line number Diff line
@@ -445,6 +445,7 @@ KBUILD_USERLDFLAGS := $(USERLDFLAGS)
# host programs.
export rust_common_flags := --edition=2021 \
			    -Zbinary_dep_depinfo=y \
			    -Astable_features \
			    -Dunsafe_op_in_unsafe_fn \
			    -Dnon_ascii_idents \
			    -Wrust_2018_idioms \
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers.c FORCE
quiet_cmd_exports = EXPORTS $@
      cmd_exports = \
	$(NM) -p --defined-only $< \
		| awk '/ (T|R|D) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
		| awk '/ (T|R|D|B) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@

$(obj)/exports_core_generated.h: $(obj)/core.o FORCE
	$(call if_changed,exports)
+4 −2
Original line number Diff line number Diff line
@@ -21,8 +21,10 @@ pub trait BoxExt<T>: Sized {

impl<T> BoxExt<T> for Box<T> {
    fn new(x: T, flags: Flags) -> Result<Self, AllocError> {
        let b = <Self as BoxExt<_>>::new_uninit(flags)?;
        Ok(Box::write(b, x))
        let mut b = <Self as BoxExt<_>>::new_uninit(flags)?;
        b.write(x);
        // SAFETY: We just wrote to it.
        Ok(unsafe { b.assume_init() })
    }

    #[cfg(any(test, testlib))]
Loading