]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaaf6b73b976765e31e85acc75127b2dd49c121d9
tree694636b967f80ac9c058bb862a7e7241f5e432c9
parentd59ba0f797c1a81ff949c26911a1898b019bd39c
bpf: test for AND edge cases

These two tests are based on the work done for 02573d428946.  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