bpf: add additional verifier tests for BPF_PROG_TYPE_LWT_*
authorThomas Graf <[email protected]>
Mon, 5 Dec 2016 09:30:52 +0000 (10:30 +0100)
committerDavid S. Miller <[email protected]>
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 <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
tools/testing/selftests/bpf/test_verifier.c