Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libbpf: add __arg_xxx macros for annotating global func args

Add a set of __arg_xxx macros which can be used to augment BPF global
subprogs/functions with extra information for use by BPF verifier.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231215011334.2307144-9-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Andrii Nakryiko and committed by
Alexei Starovoitov
aae9c25d a64bfe61

+3
+3
tools/lib/bpf/bpf_helpers.h
··· 188 188 !!sym; \ 189 189 }) 190 190 191 + #define __arg_ctx __attribute__((btf_decl_tag("arg:ctx"))) 192 + #define __arg_nonnull __attribute((btf_decl_tag("arg:nonnull"))) 193 + 191 194 #ifndef ___bpf_concat 192 195 #define ___bpf_concat(a, b) a ## b 193 196 #endif