public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Tamir Duberstein <tamird@gmail.com>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
	"Neal Gompa" <neal@gompa.dev>,
	"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	"Matthew Maurer" <mmaurer@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	"Matthias Maennich" <maennich@google.com>,
	bpf <bpf@vger.kernel.org>,
	"Martin KaFai Lau" <martin.lau@linux.dev>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Eric Curtin" <ecurtin@redhat.com>,
	"Martin Reboredo" <yakoyoku@gmail.com>,
	"Alessandro Decina" <alessandro.d@gmail.com>,
	"Michal Rostecki" <vadorovsky@protonmail.com>,
	"Dave Tucker" <dave@dtucker.co.uk>
Subject: Re: [PATCH] rust: Disallow BTF generation with Rust + LTO
Date: Thu, 9 Jan 2025 12:47:17 -0300	[thread overview]
Message-ID: <Z3_vhR_QMaK0Klly@x1> (raw)
In-Reply-To: <CAJ-ks9nYSssBsiJCQRkKoXwmAizeH1A91RzGvX6iTJAFJD2YrA@mail.gmail.com>

On Thu, Jan 09, 2025 at 09:55:34AM -0500, Tamir Duberstein wrote:
> > > > 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.
 
> In bpf-linker[0] we implemented "sanitization" to allow Rust DI to
> produce functional BTF[1]. This is certainly outside the scope of this
> change but: could pahole adopt a similar strategy rather than
> employing such coarse heuristics?

I was thinking about it after reading this thread yesterday, i.e. we
could encode constructs from Rust that can be represented in BTF and
skip the ones that can't, pruning types that depend on non BTF
representable types, etc.

This way we wouldn't care what language it was written on, as long as we
can represent the types in BTF.

I'll try to do some experimentation with this idea.

- Arnaldo
 
> [0] https://github.com/aya-rs/bpf-linker
> [1] https://github.com/aya-rs/bpf-linker/blob/e4a9267b0fee69ecb2550058d3c8e5233f946ebe/src/llvm/di.rs

  reply	other threads:[~2025-01-09 15:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 23:35 [PATCH] rust: Disallow BTF generation with Rust + LTO Matthew Maurer
2025-01-09 13:17 ` Miguel Ojeda
2025-01-09 14:10   ` Neal Gompa
2025-01-09 14:15     ` Alice Ryhl
2025-01-09 14:55       ` Tamir Duberstein
2025-01-09 15:47         ` Arnaldo Carvalho de Melo [this message]
2025-01-09 15:49           ` Tamir Duberstein
2025-01-09 16:29             ` Arnaldo Carvalho de Melo
2025-01-09 16:37               ` Arnaldo Carvalho de Melo
2025-01-09 22:39               ` Arnaldo Carvalho de Melo
2025-01-09 22:41                 ` Matthew Maurer
2025-01-10 14:54                   ` Arnaldo Carvalho de Melo
2025-01-10 16:22                 ` Dave Tucker
2025-01-10 16:41                   ` vadorovsky
2025-03-11 19:20 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z3_vhR_QMaK0Klly@x1 \
    --to=acme@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alessandro.d@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dave@dtucker.co.uk \
    --cc=ecurtin@redhat.com \
    --cc=gary@garyguo.net \
    --cc=john.fastabend@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maennich@google.com \
    --cc=martin.lau@linux.dev \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mmaurer@google.com \
    --cc=neal@gompa.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    --cc=vadorovsky@protonmail.com \
    --cc=yakoyoku@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox