]> 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)
commit307fd58aa08f5b01392ec0e8d17c625961ed39ee
tree59d859c0324f8da7eea026033a3ccd8ffec63b05
parent3398857028cb215a281598239a4437d3b2bd4192
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]