Skip to content

Commit aaa0e57

Browse files
eddyz87Alexei Starovoitov
authored andcommitted
libbpf: __arg_untrusted in bpf_helpers.h
Make btf_decl_tag("arg:untrusted") available for libbpf users via macro. Makes the following usage possible: void foo(struct bar *p __arg_untrusted) { ... } void bar(struct foo *p __arg_trusted) { ... foo(p->buz->bar); // buz derefrence looses __trusted ... } Acked-by: Kumar Kartikeya Dwivedi <[email protected]> Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 182f7df commit aaa0e57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/lib/bpf/bpf_helpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ enum libbpf_tristate {
215215
#define __arg_nonnull __attribute((btf_decl_tag("arg:nonnull")))
216216
#define __arg_nullable __attribute((btf_decl_tag("arg:nullable")))
217217
#define __arg_trusted __attribute((btf_decl_tag("arg:trusted")))
218+
#define __arg_untrusted __attribute((btf_decl_tag("arg:untrusted")))
218219
#define __arg_arena __attribute((btf_decl_tag("arg:arena")))
219220

220221
#ifndef ___bpf_concat

0 commit comments

Comments
 (0)