bpf: allow socket_filter programs to use bpf_prog_test_run
authorAlexei Starovoitov <ast@kernel.org>
Thu, 18 Jan 2018 00:52:02 +0000 (16:52 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 18 Jan 2018 21:37:58 +0000 (22:37 +0100)
commit61f3c964dfd287b05d7ac6660a4f4ddfef84786c
tree08e694284faafaea533e9ca894ca9564a16bcc27
parente7b2823a582a5bca5ee47644f448e317178e8824
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>
kernel/bpf/syscall.c
net/core/filter.c