aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2018-01-17 16:52:02 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-18 22:37:58 +0100
commit61f3c964dfd287b05d7ac6660a4f4ddfef84786c (patch)
tree08e694284faafaea533e9ca894ca9564a16bcc27 /net/core/filter.c
parentbpf: Sync kernel ABI header with tooling header (diff)
downloadlinux-dev-61f3c964dfd287b05d7ac6660a4f4ddfef84786c.tar.xz
linux-dev-61f3c964dfd287b05d7ac6660a4f4ddfef84786c.zip
bpf: allow socket_filter programs to use bpf_prog_test_run
in order to improve test coverage allow socket_filter program type to be run via bpf_prog_test_run command. Since such programs can be loaded by non-root tighten permissions for bpf_prog_test_run to be root only to avoid surprises. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index db2ee8c7e1bd..30fafaaa90fa 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -4526,6 +4526,7 @@ const struct bpf_verifier_ops sk_filter_verifier_ops = {
};
const struct bpf_prog_ops sk_filter_prog_ops = {
+ .test_run = bpf_prog_test_run_skb,
};
const struct bpf_verifier_ops tc_cls_act_verifier_ops = {