bpf: test for AND edge cases
authorJosef Bacik <jbacik@fb.com>
Fri, 3 Feb 2017 21:25:23 +0000 (16:25 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 03:35:58 +0000 (22:35 -0500)
commit29200c199cc9bde59033ab30fcc40b6c8ae630b0
tree694636b967f80ac9c058bb862a7e7241f5e432c9
parent9172d2a026f95f217da81610037608996d3f6a3f
bpf: test for AND edge cases

These two tests are based on the work done for f23cc643f9ba.  The first test is
just a basic one to make sure we don't allow AND'ing negative values, even if it
would result in a valid index for the array.  The second is a cleaned up version
of the original testcase provided by Jann Horn that resulted in the commit.

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