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

Miguel Ojeda
2025-03-11T19:20:16Z

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

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

Cc: stable@vger.kernel.org
Fixes: c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole")

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

Cheers,
Miguel