[llvm] [BPF] Handle nested wrapper structs in BPF map definition traversal (PR #144097)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 17:27:59 PDT 2025
eddyz87 wrote:
> @vadorovsky
>
> > But I think we should stop enforcing that. If the kernel really has such a requirement, I'm happy to prepare a fix and propose it to ML. I will take a look this week.
>
> I took a quick look at `kernel/bpf/{verifier,btf}.c` and did not see any places where anonymity of pointers is enforced, did not test, though. I think I added this check in `print_btf.py` only because C backend generates anonymous pointers. You can either adjust `print_btf.py` to remove the warning, or proceed with your other change that makes rust pointers anonymous. Note, however, that pointer names serve no purpose on kernel side, so this is just a bloat in the BTF strings section.
Disregard my previous comment, here is a point in the kernel source code that checks for pointers to be w/o names:
- https://elixir.bootlin.com/linux/v6.15.2/source/kernel/bpf/btf.c#L2817
- https://elixir.bootlin.com/linux/v6.15.2/source/kernel/bpf/btf.c#L2568
Function `btf.c:btf_ref_type_check_meta()`.
https://github.com/llvm/llvm-project/pull/144097
More information about the llvm-commits
mailing list