Commit aae9c25d authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

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: default avatarEduard Zingerman <eddyz87@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231215011334.2307144-9-andrii@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent a64bfe61
...@@ -188,6 +188,9 @@ enum libbpf_tristate { ...@@ -188,6 +188,9 @@ enum libbpf_tristate {
!!sym; \ !!sym; \
}) })
#define __arg_ctx __attribute__((btf_decl_tag("arg:ctx")))
#define __arg_nonnull __attribute((btf_decl_tag("arg:nonnull")))
#ifndef ___bpf_concat #ifndef ___bpf_concat
#define ___bpf_concat(a, b) a ## b #define ___bpf_concat(a, b) a ## b
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment