summaryrefslogtreecommitdiffstats
path: root/net/bpf
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2022-08-09 23:30:31 +0200
committerAlexei Starovoitov <ast@kernel.org>2022-08-10 03:46:11 +0200
commit1f0752628e76bb3a02109dbd980381f27060ba92 (patch)
tree8cf41d6d685b64997dca819cae875b2ea37c1361 /net/bpf
parentbpf, arm64: Allocate program buffer using kvcalloc instead of kcalloc (diff)
downloadlinux-1f0752628e76bb3a02109dbd980381f27060ba92.tar.xz
linux-1f0752628e76bb3a02109dbd980381f27060ba92.zip
bpf: Allow calling bpf_prog_test kfuncs in tracing programs
In addition to TC hook, enable these in tracing programs so that they can be used in selftests. Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20220809213033.24147-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/bpf')
-rw-r--r--net/bpf/test_run.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index cbc9cd5058cb..d11209367dd0 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -1628,6 +1628,7 @@ static int __init bpf_prog_test_run_init(void)
int ret;
ret = register_btf_kfunc_id_set(BPF_PROG_TYPE_SCHED_CLS, &bpf_prog_test_kfunc_set);
+ ret = ret ?: register_btf_kfunc_id_set(BPF_PROG_TYPE_TRACING, &bpf_prog_test_kfunc_set);
return ret ?: register_btf_id_dtor_kfuncs(bpf_prog_test_dtor_kfunc,
ARRAY_SIZE(bpf_prog_test_dtor_kfunc),
THIS_MODULE);