]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: enforce return code for cgroup-bpf programs
authorAlexei Starovoitov <ast@fb.com>
Tue, 3 Oct 2017 05:50:23 +0000 (22:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Oct 2017 23:05:05 +0000 (16:05 -0700)
commitf2e461f2a33b135c35f84305c97814777081051e
tree9a5d9870bb4cf67905cb638cbe1b3063251a100f
parentf4d58d2536b40042c6c259c772354a91dfed1dcb
bpf: enforce return code for cgroup-bpf programs

with addition of tnum logic the verifier got smart enough and
we can enforce return codes at program load time.
For now do so for cgroup-bpf program types.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c
tools/testing/selftests/bpf/test_verifier.c