Patch "kbuild: rust: remove unneeded `@rustc_cfg` to avoid ICE" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    kbuild: rust: remove unneeded `@rustc_cfg` to avoid ICE

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kbuild-rust-remove-unneeded-rustc_cfg-to-avoid-ice.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 50cfe93b01475ba36878b65d35d812e1bb48ac71 Mon Sep 17 00:00:00 2001
From: Miguel Ojeda <ojeda@xxxxxxxxxx>
Date: Mon, 22 Apr 2024 11:12:15 +0200
Subject: kbuild: rust: remove unneeded `@rustc_cfg` to avoid ICE

From: Miguel Ojeda <ojeda@xxxxxxxxxx>

commit 50cfe93b01475ba36878b65d35d812e1bb48ac71 upstream.

When KUnit tests are enabled, under very big kernel configurations
(e.g. `allyesconfig`), we can trigger a `rustdoc` ICE [1]:

      RUSTDOC TK rust/kernel/lib.rs
    error: the compiler unexpectedly panicked. this is a bug.

The reason is that this build step has a duplicated `@rustc_cfg` argument,
which contains the kernel configuration, and thus a lot of arguments. The
factor 2 happens to be enough to reach the ICE.

Thus remove the unneeded `@rustc_cfg`. By doing so, we clean up the
command and workaround the ICE.

The ICE has been fixed in the upcoming Rust 1.79 [2].

Cc: stable@xxxxxxxxxxxxxxx
Fixes: a66d733da801 ("rust: support running Rust documentation tests as KUnit ones")
Link: https://github.com/rust-lang/rust/issues/122722 [1]
Link: https://github.com/rust-lang/rust/pull/122840 [2]
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240422091215.526688-1-ojeda@xxxxxxxxxx
Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 rust/Makefile |    1 -
 1 file changed, 1 deletion(-)

--- a/rust/Makefile
+++ b/rust/Makefile
@@ -173,7 +173,6 @@ quiet_cmd_rustdoc_test_kernel = RUSTDOC
 	mkdir -p $(objtree)/$(obj)/test/doctests/kernel; \
 	OBJTREE=$(abspath $(objtree)) \
 	$(RUSTDOC) --test $(rust_flags) \
-		@$(objtree)/include/generated/rustc_cfg \
 		-L$(objtree)/$(obj) --extern alloc --extern kernel \
 		--extern build_error --extern macros \
 		--extern bindings --extern uapi \


Patches currently in stable-queue which might be from ojeda@xxxxxxxxxx are

queue-6.6/rust-remove-params-from-module-macro-example.patch
queue-6.6/kbuild-rust-remove-unneeded-rustc_cfg-to-avoid-ice.patch
queue-6.6/rust-don-t-select-constructors.patch
queue-6.6/rust-kernel-require-send-for-module-implementations.patch
queue-6.6/rust-init-remove-impl-zeroable-for-infallible.patch
queue-6.6/rust-make-mutually-exclusive-with-cfi_clang.patch
queue-6.6/kbuild-rust-force-alloc-extern-to-allow-empty-rust-files.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux