bpf: add various verifier test cases for self-tests
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 31 Mar 2017 00:24:04 +0000 (02:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Apr 2017 19:36:37 +0000 (12:36 -0700)
commit02ea80b1850e48abbce77878896229d7cc5cb230
tree9098a803f81125ec916cbb36610b45ddd6731f51
parent79adffcd6489ef43bda2dfded3d637d7fb4fac80
bpf: add various verifier test cases for self-tests

Add a couple of test cases, for example, probing for xadd on a spilled
pointer to packet and map_value_adj register, various other map_value_adj
tests including the unaligned load/store, and trying out pointer arithmetic
on map_value_adj register itself. For the unaligned load/store, we need
to figure out whether the architecture has efficient unaligned access and
need to mark affected tests accordingly.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/include/linux/filter.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_verifier.c