diff options
author | Kui-Feng Lee <thinker.li@gmail.com> | 2024-01-19 23:50:04 +0100 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2024-01-24 02:12:52 +0100 |
commit | 7c81c2490c73e614c6d48e4f339f4f224140b565 (patch) | |
tree | e4818b6ed76d5c6cb7148ac56db2a826c36272e5 /kernel/bpf | |
parent | libbpf: Find correct module BTFs for struct_ops maps and progs. (diff) | |
download | linux-7c81c2490c73e614c6d48e4f339f4f224140b565.tar.xz linux-7c81c2490c73e614c6d48e4f339f4f224140b565.zip |
bpf: export btf_ctx_access to modules.
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 <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240119225005.668602-14-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/btf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 5c3e526a2dec..edef96ceffa3 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -6322,6 +6322,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 */ |