diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2022-07-01 14:47:27 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-07-01 12:56:27 -0700 |
commit | a49b8ce7306cf8031361a6a4f7f6bc7a775a39c8 (patch) | |
tree | 53dee9ecd3cb124fa265c7600fe53f307d8ea9e7 /kernel | |
parent | 73c4936f916de73fa3faec204a4deb37c25e18c1 (diff) |
bpf, selftests: Add verifier test case for jmp32's jeq/jne
Add a test case to trigger the verifier's incorrect conclusion in the
case of jmp32's jeq/jne. Also here, make use of dead code elimination,
so that we can see the verifier bailing out on unfixed kernels.
Before:
# ./test_verifier 724
#724/p jeq32/jne32: bounds checking FAIL
Failed to load prog 'Permission denied'!
R4 !read_ok
verification time 8 usec
stack depth 0
processed 8 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 0
Summary: 0 PASSED, 0 SKIPPED, 1 FAILED
After:
# ./test_verifier 724
#724/p jeq32/jne32: bounds checking OK
Summary: 1 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220701124727.11153-4-daniel@iogearbox.net
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions