[PATCH bpf-next 2/2] bpf: allow kfuncs within normal tracepoint programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Account for normal tracepoint programs by associating them with the kfunc
tracing hook. This allows kfuncs to be called within tracepoint programs.

Signed-off-by: JP Kobryn <inwardvessel@xxxxxxxxx>
---
 kernel/bpf/btf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 520f49f422fe..8b844d6fd041 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -8303,6 +8303,7 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type)
 		return BTF_KFUNC_HOOK_TC;
 	case BPF_PROG_TYPE_STRUCT_OPS:
 		return BTF_KFUNC_HOOK_STRUCT_OPS;
+	case BPF_PROG_TYPE_TRACEPOINT:
 	case BPF_PROG_TYPE_TRACING:
 	case BPF_PROG_TYPE_LSM:
 		return BTF_KFUNC_HOOK_TRACING;
-- 
2.46.0





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux