]> 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)
commit9a8310ba4426bcd846c0c911394077c9c21fd537
tree9a5d9870bb4cf67905cb638cbe1b3063251a100f
parentad1c13866180d1f6035d810446a52fb396cee46d
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