[llvm] [BPF] Handle nested wrapper structs in BPF map definition traversal (PR #144097)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 00:26:15 PDT 2025
eddyz87 wrote:
@vadorovsky,
> On a side note, I know that such nested definition doesn't work on libbpf. I made it work in Aya by modyfing the logic for parsing BTF maps. It works fine and the kernel is able to work with such program.
Noted, I think it's fine, this is a unit test for some backend functionality it doesn't need to be something that fully works end-to-end from Rust/C to kernel.
> I'm happy to port that to libbpf eventually, if there is interest.
libbpf is C oriented and I don't think there is a use-case, but you can always ask on the mailing list.
> I see. Would you be still open to relaxing `print_btf.py` (which I already pushed as a prerequisite commit)
The name is printed anyways, so signal is not lost => removing the warning from `print_btf.py` is fine.
> and me sending a patch relaxing that requirement in the kernel as well?
As I said, there is no functional reason for pointer types to have names in BTF, any strings encoding such names would unnecessarily use space in the .BTF strings section. Hence, I think upstream kernel might object, but who knows.
By the way, I encourage you to make a small test for yourself, there might be some differences between BTF validation rules applied to kernel/module BTF and program BTF.
https://github.com/llvm/llvm-project/pull/144097
More information about the llvm-commits
mailing list