-
Notifications
You must be signed in to change notification settings - Fork 465
scripts: Exclude Rust compilation units with pahole #872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: Exclude Rust compilation units with pahole #872
Conversation
a3f3992
to
338f918
Compare
225d812
to
82a9615
Compare
To test this change (as of 459035a) the flag |
Sorry, I got this swapped out from my brain -- could you please expand a bit on why the flag is needed for testing? The PR otherwise looks good to me, though this probably should go through the BPF tree after the Rust merge. Did you mean that by "gonna land in upstream probably"? |
82a9615
to
54a25f3
Compare
There was an issue related to 64 bit enums with the stable branches of the kernel. Though it's solved for both stable and 6.0+ because with the former they've added |
54a25f3
to
59c3180
Compare
@ojeda I think this is now ready for inclusion. |
We really need this upstream if this does fix the bpf issue with Rust for Linux, is CONFIG_MODULE_ALLOW_BTF_MISMATCH=y required also or no? |
I can confirm this worked great for me, to get BPF back working with the Rust-based GPU driver on our Fedora Asahi kernel for the non-Rust parts: https://gitlab.com/fedora-asahi/kernel-asahi/-/commit/cb4241a09a5eeb51d07455df2ca8a1a882990c6f So...
|
84305dc
to
b978938
Compare
I don't think so as Also I've added those tags in the commit message to credit you, @ericcurtin, so thanks to you too for testing this PR. |
Yup you are right, tested without it, works great! |
Verified as well:
|
b978938
to
fe76eb0
Compare
You were added too, @Conan-Kudo. |
Thanks everyone! The tags are very useful. @YakoYakoYokuYoku For upstream, could you please submit the patch? If so, please Cc the BPF list & maintainers and probably the |
There it goes, though I've fooled up and the message was sent twice. If I recall fixes should be sent upstream directly, right? |
Thanks, and no worries :)
At this point, as soon as something has all its dependencies already in mainline, it can be sent. |
Version 1.24 of pahole has the capability to exclude compilation units (CUs) of specific languages [1] [2]. Rust, as of writing, is not currently supported by pahole and if it's used with a build that has BTF debugging enabled it results in malformed kernel and module binaries [3]. So it's better for pahole to exclude Rust CUs until support for it arrives. Link: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=49358dfe2aaae4e90b072332c3e324019826783f [1] Link: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=8ee363790b7437283c53090a85a9fec2f0b0fbc4 [2] Link: Rust-for-Linux#735 [3] Co-developed-by: Eric Curtin <ecurtin@redhat.com> Signed-off-by: Eric Curtin <ecurtin@redhat.com> Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
fe76eb0
to
dcc5038
Compare
@ojeda, can you merge this? This was accepted for |
Sure (in any case, please note that the |
Version 1.24 of pahole has the capability to exclude compilation units (CUs) of specific languages with the
--lang_exclude
option.Rust, as of writing, is not currently supported by pahole neither BTF and if it's used with a build that has
DEBUG_INFO_BTF_MODULES
enabled it results in erroneous binaries. So it's better for pahole to exclude Rust compilation units until support for it arrives.Fixes #735.