diff options
author | Martin KaFai Lau <kafai@fb.com> | 2021-03-25 04:52:52 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-03-27 06:41:52 +0300 |
commit | 7bd1590d4eba1583f6ee85e8cfe556505f761e19 (patch) | |
tree | 81b9cba9579d98af8e9bc27622a8e16e0905848f /net/core | |
parent | 78e60bbbe8e8f614b6a453d8a780d9e6f77749a8 (diff) | |
download | linux-7bd1590d4eba1583f6ee85e8cfe556505f761e19.tar.xz |
bpf: selftests: Add kfunc_call test
This patch adds a few kernel function bpf_kfunc_call_test*() for the
selftest's test_run purpose. They will be allowed for tc_cls prog.
The selftest calling the kernel function bpf_kfunc_call_test*()
is also added in this patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210325015252.1551395-1-kafai@fb.com
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 17dc159ec40c..cae56d08a670 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -9813,6 +9813,7 @@ const struct bpf_verifier_ops tc_cls_act_verifier_ops = { .convert_ctx_access = tc_cls_act_convert_ctx_access, .gen_prologue = tc_cls_act_prologue, .gen_ld_abs = bpf_gen_ld_abs, + .check_kfunc_call = bpf_prog_test_check_kfunc_call, }; const struct bpf_prog_ops tc_cls_act_prog_ops = { |