]> git.baikalelectronics.ru Git - kernel.git/commit
net: filter: add test case for jump with holes and ret x variants
authorDaniel Borkmann <dborkman@redhat.com>
Fri, 23 May 2014 16:44:01 +0000 (18:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 May 2014 20:48:06 +0000 (16:48 -0400)
commit53a76e5bf9fe3a81292737604cc54fdbfe7f2695
treeef3101980fef5d2f580026d96c78b40fe007b43b
parent9ecf5b60e52dd8f7051c4822e24c0b67b343cfaf
net: filter: add test case for jump with holes and ret x variants

This patch adds three more test cases:

 1) long jumps with holes of unreachable code
 2) ret x
 3) ldx + ret x

All three tests are for classical BPF and to make sure that
any changes will not break some exotic behaviour that exists
probably since decades. The last two tests are expected to
fail by the BPF checker already, as in classic BPF only K
or A are allowed to be returned. Thus, there are now 52 test
cases for BPF.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_bpf.c