From: Greg Kroah-Hartman Date: Sun, 16 Mar 2025 15:47:09 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.6.84~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e13e5f91b48eec0e1978012a69c67730fede726;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: rust-disallow-btf-generation-with-rust-lto.patch --- diff --git a/queue-6.6/rust-disallow-btf-generation-with-rust-lto.patch b/queue-6.6/rust-disallow-btf-generation-with-rust-lto.patch new file mode 100644 index 0000000000..7c39b00c69 --- /dev/null +++ b/queue-6.6/rust-disallow-btf-generation-with-rust-lto.patch @@ -0,0 +1,37 @@ +From 5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619 Mon Sep 17 00:00:00 2001 +From: Matthew Maurer +Date: Wed, 8 Jan 2025 23:35:08 +0000 +Subject: rust: Disallow BTF generation with Rust + LTO + +From: Matthew Maurer + +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 +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 +Signed-off-by: Greg Kroah-Hartman +--- + init/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1908,7 +1908,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. + diff --git a/queue-6.6/series b/queue-6.6/series index df875ae8cb..b754eeecd8 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -139,3 +139,4 @@ dm-flakey-fix-memory-corruption-in-optional-corrupt_bio_byte-feature.patch arm64-mm-populate-vmemmap-at-the-page-level-if-not-section-aligned.patch qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch smb-client-fix-regression-with-guest-option.patch +rust-disallow-btf-generation-with-rust-lto.patch