diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-11-01 15:21:53 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-11-01 18:05:12 -0700 |
commit | 0869e5078afbd1b22c20832b391b2d85291bc0a8 (patch) | |
tree | 897e20cf1eba018a44b23d3362a05891de855e81 /scripts | |
parent | 388e2c0b978339dee9b0a81a2e546f8979e021e2 (diff) | |
download | linux-0869e5078afbd1b22c20832b391b2d85291bc0a8.tar.bz2 |
selftests/bpf: Add a testcase for 64-bit bounds propagation issue.
./test_progs-no_alu32 -vv -t twfw
Before the 64-bit_into_32-bit fix:
19: (25) if r1 > 0x3f goto pc+6
R1_w=inv(id=0,umax_value=63,var_off=(0x0; 0xff),s32_max_value=255,u32_max_value=255)
and eventually:
invalid access to map value, value_size=8 off=7 size=8
R6 max value is outside of the allowed memory range
libbpf: failed to load object 'no_alu32/twfw.o'
After the fix:
19: (25) if r1 > 0x3f goto pc+6
R1_w=inv(id=0,umax_value=63,var_off=(0x0; 0x3f))
verif_twfw:OK
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20211101222153.78759-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions