summaryrefslogtreecommitdiff
path: root/include/uapi/linux/patchkey.h
diff options
context:
space:
mode:
authorMaxim Skokov <skokovmaksimevg@gmail.com>2026-10-09 20:47:48 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-10-10 15:01:15 +0000
commit2e6be13e8ca42348ca9c68544f014f29cc677894 (patch)
treeab8c941fcf3435ac38ec99d0d3229daf05453779 /include/uapi/linux/patchkey.h
parent36edb1c7738dade8ed83ec4e0aef000e538b2095 (diff)
downloadlinux-next-2e6be13e8ca42348ca9c68544f014f29cc677894.tar.gz
linux-next-2e6be13e8ca42348ca9c68544f014f29cc677894.zip
selftests/bpf: Cover test_run csum validation after bpf_skb_change_tail()
Add BPF_F_TEST_SKB_CHECKSUM_COMPLETE tests for tc programs that move the skb out of CHECKSUM_COMPLETE with bpf_skb_change_tail(): - change_tail_trim trims the last 4 bytes of pkt_v4. They hold the non-zero tcp.urg_ptr, so the stale skb->csum no longer matches the packet. - change_tail_grow_write appends 4 zero bytes, which on their own do not change the sum, and then writes a byte with BPF_F_RECOMPUTE_CSUM. That write can no longer update skb->csum. Both return -EBADMSG without the preceding test_run fix and pass with it. Also add store_no_recompute as a negative test. It writes a byte without BPF_F_RECOMPUTE_CSUM, so the skb stays CHECKSUM_COMPLETE with a stale skb->csum, and test_run must keep returning -EBADMSG. This checks that the validation still runs for CHECKSUM_COMPLETE skbs. The passing case, a CHECKSUM_COMPLETE skb whose checksum is updated correctly, is already covered by test_skb_pkt_end. Signed-off-by: Maxim Skokov <skokovmaksimevg@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261009174755.22026-3-skokovmaksimevg@gmail.com
Diffstat (limited to 'include/uapi/linux/patchkey.h')
0 files changed, 0 insertions, 0 deletions