]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Mar 2025 15:46:05 +0000 (16:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Mar 2025 15:46:05 +0000 (16:46 +0100)
added patches:
rust-disallow-btf-generation-with-rust-lto.patch

queue-6.1/rust-disallow-btf-generation-with-rust-lto.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/rust-disallow-btf-generation-with-rust-lto.patch b/queue-6.1/rust-disallow-btf-generation-with-rust-lto.patch
new file mode 100644 (file)
index 0000000..777b0fb
--- /dev/null
@@ -0,0 +1,37 @@
+From 5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619 Mon Sep 17 00:00:00 2001
+From: Matthew Maurer <mmaurer@google.com>
+Date: Wed, 8 Jan 2025 23:35:08 +0000
+Subject: rust: Disallow BTF generation with Rust + LTO
+
+From: Matthew Maurer <mmaurer@google.com>
+
+commit 5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619 upstream.
+
+The kernel cannot currently self-parse BTF containing Rust debug
+information. pahole uses the language of the CU to determine whether to
+filter out debug information when generating the BTF. When LTO is
+enabled, Rust code can cross CU boundaries, resulting in Rust debug
+information in CUs labeled as C. This results in a system which cannot
+parse its own BTF.
+
+Signed-off-by: Matthew Maurer <mmaurer@google.com>
+Cc: stable@vger.kernel.org
+Fixes: c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole")
+Link: https://lore.kernel.org/r/20250108-rust-btf-lto-incompat-v1-1-60243ff6d820@google.com
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ init/Kconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -1925,7 +1925,7 @@ config RUST
+       depends on !GCC_PLUGINS
+       depends on !RANDSTRUCT
+       depends on !SHADOW_CALL_STACK
+-      depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
++      depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
+       help
+         Enables Rust support in the kernel.
index 1a13f0efe14c7cf266dc680c895e0c8ba8b6245d..9e4d756958faea65e1ddd3295f7ccbb4b8b183bb 100644 (file)
@@ -121,3 +121,4 @@ drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch
 clk-samsung-update-pll-locktime-for-pll142xx-used-on-fsd-platform.patch
 asoc-amd-yc-support-mic-on-another-lenovo-thinkpad-e16-gen-2-model.patch
 qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch
+rust-disallow-btf-generation-with-rust-lto.patch