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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 2db2b8c commit bc638d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)