diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-10-10 15:01:16 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-10-10 15:01:16 +0000 |
| commit | 03e13ba413974a167e643aeef138a8e63f4cbf7d (patch) | |
| tree | ab8c941fcf3435ac38ec99d0d3229daf05453779 /include/uapi/linux/kernel.h | |
| parent | 15b578b1715d9a318c804350d98af87c203672bc (diff) | |
| parent | 2e6be13e8ca42348ca9c68544f014f29cc677894 (diff) | |
| download | linux-next-03e13ba413974a167e643aeef138a8e63f4cbf7d.tar.gz linux-next-03e13ba413974a167e643aeef138a8e63f4cbf7d.zip | |
Merge branch 'bpf-test_run-fix-false-ebadmsg-with-bpf_f_test_skb_checksum_complete'
Maxim Skokov says:
====================
bpf: test_run: Fix false -EBADMSG with BPF_F_TEST_SKB_CHECKSUM_COMPLETE
BPF_PROG_TEST_RUN with BPF_F_TEST_SKB_CHECKSUM_COMPLETE returns -EBADMSG
for correct tc programs that call bpf_skb_change_tail(). The helper
moves the skb to CHECKSUM_NONE and leaves skb->csum stale, but the
post-run check added by commit a3cfe84cca28 ("bpf: Add CHECKSUM_COMPLETE
to bpf test progs") still compares against it.
Patch 1 only does the check while the skb is still CHECKSUM_COMPLETE.
Patch 2 adds selftests for a trim, a grow followed by a write, and a
negative case that keeps the skb CHECKSUM_COMPLETE with a stale
skb->csum.
Tested in a VM on bpf, with two kernels that differ only by patch 1
(subtest results):
without patch 1 with patch 1
change_tail_trim FAIL (-EBADMSG) OK
change_tail_grow_write FAIL (-EBADMSG) OK
store_no_recompute OK OK
test_skb_pkt_end OK OK
Changes in v2:
- Put the opening /* of multi-line comments on its own line (bpf-ci,
Sashiko).
v1: https://lore.kernel.org/bpf/20261007181249.352831-1-skokovmaksimevg@gmail.com/
====================
Link: https://patch.msgid.link/20261009174755.22026-1-skokovmaksimevg@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/uapi/linux/kernel.h')
0 files changed, 0 insertions, 0 deletions
