OSDN Git Service

libbpf: Make __kptr and __kptr_ref unconditionally use btf_type_tag() attr
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 9 May 2022 00:41:41 +0000 (17:41 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 9 May 2022 15:14:40 +0000 (17:14 +0200)
commit8e2f618e8be66f74e6e088281ca72deb5c87cf04
tree85ff3bfc3436208a57c6dff2f52ca98d87eb4b84
parent1e2666e029e5cc2b81dbd7c85af5bcc8c80524e0
libbpf: Make __kptr and __kptr_ref unconditionally use btf_type_tag() attr

It will be annoying and surprising for users of __kptr and __kptr_ref if
libbpf silently ignores them just because Clang used for compilation
didn't support btf_type_tag(). It's much better to get clear compiler
error than debug BPF verifier failures later on.

Fixes: ef89654f2bc7 ("libbpf: Add kptr type tag macros to bpf_helpers.h")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220509004148.1801791-3-andrii@kernel.org
tools/lib/bpf/bpf_helpers.h