summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-10-30 21:09:50 +0000
committerAlexei Starovoitov <ast@kernel.org>2026-11-02 00:04:07 +0000
commit61f833f968fecbaa4fd98881d7213d972dc01717 (patch)
tree92f1e1a6d248a3fc11edb4d4a4d732cf7a014572 /scripts/basic/split-include.c
parent88e2c896d8598a49da1e01f27ce23acd5dc04b32 (diff)
downloadlinux-61f833f968fecbaa4fd98881d7213d972dc01717.tar.gz
linux-61f833f968fecbaa4fd98881d7213d972dc01717.zip
selftests/bpf: Test the valid bytes of a packet pointer in a counted loop
Each test adds r4 to a packet pointer. r4 is 0, 8 .. 48, but its umax is 50. test umax gets smaller result ---------------------------------------- ------------------- ------ widen_pkt_pointer_step_lowers_umax at the loop entry reject widen_pkt_pointer_step_lowers_umax_down the same, r6 += -8 reject widen_pkt_pointer_negative_offset no, only smax reject clamp_pkt_pointer_step_lowers_umax at the back edge reject union_pkt_pointer_var_off_lowers_umax r5 is r6 + 8 or r6 reject widen_pkt_pointer_keeps_valid_bytes at the loop entry loads The first five progs load without the fix. The last prog reads only bytes that the compare with pkt_end covers. widen_pkt_pointer_beyond_pkt_end makes sure that the mark "beyond pkt_end" is not in the state at the head of the loop. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261030210950.1904640-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions