bpf: add additional verifier tests for BPF_PROG_TYPE_LWT_*
authorThomas Graf <tgraf@suug.ch>
Mon, 5 Dec 2016 09:30:52 +0000 (10:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Dec 2016 15:14:52 +0000 (10:14 -0500)
commit3f731d89e4071086b6d4764ef6ee80c1099c639d
treed8756ddf2bfbc02c3d0bc7fa2d919eba375374f8
parentfd7aabb062fa1a8331a786d617744de220eaf002
bpf: add additional verifier tests for BPF_PROG_TYPE_LWT_*

- direct packet read is allowed for LWT_*
 - direct packet write for LWT_IN/LWT_OUT is prohibited
 - direct packet write for LWT_XMIT is allowed
 - access to skb->tc_classid is prohibited for LWT_*

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