aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/sancov_plugin.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2021-11-01 22:21:53 +0000
committerAndrii Nakryiko <[email protected]>2021-11-02 01:05:12 +0000
commit0869e5078afbd1b22c20832b391b2d85291bc0a8 (patch)
tree897e20cf1eba018a44b23d3362a05891de855e81 /scripts/gcc-plugins/sancov_plugin.c
parentbpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit. (diff)
downloadkernel-0869e5078afbd1b22c20832b391b2d85291bc0a8.tar.gz
kernel-0869e5078afbd1b22c20832b391b2d85291bc0a8.zip
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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions