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)
commit390ee7e29fc8e6e90d3065b00afb047c4ee552f9
tree9a5d9870bb4cf67905cb638cbe1b3063251a100f
parent468e2f64d220fe2dc11caa2bcb9b3a1e50fc7321
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