]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add read-only map values propagation tests
authorAndrii Nakryiko <andriin@fb.com>
Wed, 9 Oct 2019 20:14:58 +0000 (13:14 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 Oct 2019 23:49:15 +0000 (01:49 +0200)
commitd734fa931f9b7a407fef8c7b532c12324b9e0ac6
tree59d859c0324f8da7eea026033a3ccd8ffec63b05
parent46a1145a9048828b781c3805a0af51554e636462
selftests/bpf: Add read-only map values propagation tests

Add tests checking that verifier does proper constant propagation for
read-only maps. If constant propagation didn't work, skipp_loop and
part_loop BPF programs would be rejected due to BPF verifier otherwise
not being able to prove they ever complete. With constant propagation,
though, they are succesfully validated as properly terminating loops.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191009201458.2679171-3-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/rdonly_maps.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_rdonly_maps.c [new file with mode: 0644]