diff options
author | Daniel Borkmann | 2022-07-01 14:47:26 +0200 |
---|---|---|
committer | Andrii Nakryiko | 2022-07-01 12:56:27 -0700 |
commit | 73c4936f916de73fa3faec204a4deb37c25e18c1 (patch) | |
tree | 0506d390feeea1e4b7e693cc85a4cf89215c0a67 /tools/edid | |
parent | 3844d153a41adea718202c10ae91dc96b37453b5 (diff) |
bpf, selftests: Add verifier test case for imm=0,umin=0,umax=1 scalar
Add a test case to trigger the constant scalar issue which leaves the
register in scalar(imm=0,umin=0,umax=1,var_off=(0x0; 0x0)) state. Make
use of dead code elimination, so that we can see the verifier bailing
out on unfixed kernels. For the condition, we use jle given it checks
on umax bound.
Before:
# ./test_verifier 743
#743/p jump & dead code elimination FAIL
Failed to load prog 'Permission denied'!
R4 !read_ok
verification time 11 usec
stack depth 0
processed 13 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1
Summary: 0 PASSED, 0 SKIPPED, 1 FAILED
After:
# ./test_verifier 743
#743/p jump & dead code elimination 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-3-daniel@iogearbox.net
Diffstat (limited to 'tools/edid')
0 files changed, 0 insertions, 0 deletions