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 13:37:04 -0300 [thread overview]
Message-ID: <Z3_7MM30-wwY5ihQ@x1> (raw)
In-Reply-To: <Z3_5eGD_F1_ZxfqE@x1>
On Thu, Jan 09, 2025 at 01:29:47PM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, Jan 09, 2025 at 10:49:49AM -0500, Tamir Duberstein wrote:
> > On Thu, Jan 9, 2025 at 10:47 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > 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.
> > Yep, this is what bpf-linker does, along with some other things[0]. I
> > highly recommend reading the code I linked to avoid re-discovering
> > these things.
> Sure, thanks for pointing it out and suggest I read it while
> experimenting with having the same concept in pahole, I'll try a quick
> hack and then look at it to see how close I got to what you guys came up
> with :-)
BTW, its "funny" how the DWARF loader can get things from Rust, golang,
fortran and end up with things like:
Rust:
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=d744d859768d6951cacd146604891c108b39f6a1
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=c4eb1897d1f3841d291ee39dc969c4212750cf2c
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=2e8cd6a435d96335c4794794147019369b6a7b6a
FORTRAN:
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=f5847773d94d4875e04e47de9b677098f34c6510
Go:
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=31bc0d7410572f6e03e3ed9da7c8c6f0d8df23c8
Now its a matter of making the BTF encoder be more permissive and just
skip things it can't express in BTF.
:-)
- Arnaldo
next prev parent reply other threads:[~2025-01-09 16:37 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
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 [this message]
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_7MM30-wwY5ihQ@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