]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add various test cases to selftests
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 2 Jan 2019 23:58:35 +0000 (00:58 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 3 Jan 2019 00:01:24 +0000 (16:01 -0800)
commitcf609f1a612ea01cf4f9df8adb58987200aab5bb
tree0aec20aa0c87f1cef2241c726cbbc404f5317155
parent422fca2ce03fa81b6e77c11ec47b60f5c3e12a8c
bpf: add various test cases to selftests

Add various map value pointer related test cases to test_verifier
kselftest to reflect recent changes and improve test coverage. The
tests include basic masking functionality, unprivileged behavior
on pointer arithmetic which goes oob, mixed bounds tests, negative
unknown scalar but resulting positive offset for access and helper
range, handling of arithmetic from multiple maps, various masking
scenarios with subsequent map value access and others including two
test cases from Jann Horn for prior fixes.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_verifier.c