Skip to content

Commit bc638d8

Browse files
inwardvesselAlexei Starovoitov
authored andcommitted
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>
1 parent 2db2b8c commit bc638d8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/bpf/btf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8357,6 +8357,8 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type)
83578357
case BPF_PROG_TYPE_STRUCT_OPS:
83588358
return BTF_KFUNC_HOOK_STRUCT_OPS;
83598359
case BPF_PROG_TYPE_TRACING:
8360+
case BPF_PROG_TYPE_TRACEPOINT:
8361+
case BPF_PROG_TYPE_PERF_EVENT:
83608362
case BPF_PROG_TYPE_LSM:
83618363
return BTF_KFUNC_HOOK_TRACING;
83628364
case BPF_PROG_TYPE_SYSCALL:

0 commit comments

Comments
 (0)