Re: [PATCH] rust: Disallow BTF generation with Rust + LTO

From: Miguel Ojeda
Date: Tue Mar 11 2025 - 15:20:26 EST


On Thu, Jan 9, 2025 at 12:35 AM Matthew Maurer <mmaurer@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>

Applied to `rust-fixes` -- thanks everyone!

Cc: stable@xxxxxxxxxxxxxxx
Fixes: c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole")

If someone disagrees with those tags, please let me know.

Cheers,
Miguel