]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add various verifier test cases
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 24 May 2017 23:05:09 +0000 (01:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 17:44:28 +0000 (13:44 -0400)
commitd235b28fe98e82639f48375b2630c5ab278682de
tree0dc8e1e5384df1cdadfb109bbd191eafe24a594d
parentfba5ddfabeb53d54a826355771d1804ffde23759
bpf: add various verifier test cases

This patch adds various verifier test cases:

1) A test case for the pruning issue when tracking alignment
   is used.
2) Various PTR_TO_MAP_VALUE_OR_NULL tests to make sure pointer
   arithmetic turns such register into UNKNOWN_VALUE type.
3) Test cases for the special treatment of LD_ABS/LD_IND to
   make sure verifier doesn't break calling convention here.
   Latter is needed, since f.e. arm64 JIT uses r1 - r5 for
   storing temporary data, so they really must be marked as
   NOT_INIT.

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