Skip to content

Commit

Permalink
bpf: export btf_ctx_access to modules.
Browse files Browse the repository at this point in the history
The module requires the use of btf_ctx_access() to invoke
bpf_tracing_btf_ctx_access() from a module. This function is valuable for
implementing validation functions that ensure proper access to ctx.

Signed-off-by: Kui-Feng Lee <[email protected]>
  • Loading branch information
ThinkerYzu1 authored and d-e-s-o committed Oct 16, 2023
1 parent b937492 commit cb371cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/bpf/btf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6141,6 +6141,7 @@ bool btf_ctx_access(int off, int size, enum bpf_access_type type,
__btf_name_by_offset(btf, t->name_off));
return true;
}
EXPORT_SYMBOL_GPL(btf_ctx_access);

enum bpf_struct_walk_result {
/* < 0 error */
Expand Down

0 comments on commit cb371cb

Please sign in to comment.