diff options
| author | Andrii Nakryiko <[email protected]> | 2023-12-15 01:13:32 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-12-20 02:06:47 +0000 |
| commit | aae9c25dda159045b223ecb471cd0729ccec8285 (patch) | |
| tree | 9deb9267269fb33e487df552afa5fa6bd416942b /tools/lib/bpf/bpf_helpers.h | |
| parent | bpf: add support for passing dynptr pointer to global subprog (diff) | |
| download | kernel-aae9c25dda159045b223ecb471cd0729ccec8285.tar.gz kernel-aae9c25dda159045b223ecb471cd0729ccec8285.zip | |
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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/lib/bpf/bpf_helpers.h')
| -rw-r--r-- | tools/lib/bpf/bpf_helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h index 77ceea575dc7..2324cc42b017 100644 --- a/tools/lib/bpf/bpf_helpers.h +++ b/tools/lib/bpf/bpf_helpers.h @@ -188,6 +188,9 @@ enum libbpf_tristate { !!sym; \ }) +#define __arg_ctx __attribute__((btf_decl_tag("arg:ctx"))) +#define __arg_nonnull __attribute((btf_decl_tag("arg:nonnull"))) + #ifndef ___bpf_concat #define ___bpf_concat(a, b) a ## b #endif |
