diff options
author | JP Kobryn <inwardvessel@gmail.com> | 2024-09-05 15:38:11 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-09-05 17:02:03 -0700 |
commit | bc638d8cb5be813d4eeb9f63cce52caaa18f3960 (patch) | |
tree | 1a977f4824c95b38b7d3fa8ac287e6b446a02928 /kernel/bpf | |
parent | 2db2b8cb8f96bb1def9904abbc859d95e3fbf99c (diff) |
bpf: allow kfuncs within tracepoint and perf event programs
Associate tracepoint and perf event program types with the kfunc tracing
hook. This allows calling kfuncs within these types of programs.
Signed-off-by: JP Kobryn <inwardvessel@gmail.com>
Link: https://lore.kernel.org/r/20240905223812.141857-2-inwardvessel@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/btf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 1e29281653c6..59b4f7265761 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -8357,6 +8357,8 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type) case BPF_PROG_TYPE_STRUCT_OPS: return BTF_KFUNC_HOOK_STRUCT_OPS; case BPF_PROG_TYPE_TRACING: + case BPF_PROG_TYPE_TRACEPOINT: + case BPF_PROG_TYPE_PERF_EVENT: case BPF_PROG_TYPE_LSM: return BTF_KFUNC_HOOK_TRACING; case BPF_PROG_TYPE_SYSCALL: |