diff options
| author | Ayushman Rout <ayushmanrout27@gmail.com> | 2026-10-26 21:58:09 +0530 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-11-01 01:10:23 +0000 |
| commit | 8f92b56d228d8fa4d372f7b410c1ced1e92eb664 (patch) | |
| tree | 0a32a475a3f2082565d63de0d713c77bb1687288 /scripts/basic/split-include.c | |
| parent | 696f0954e3b6280aa87ea4a6196153e506b0ab9c (diff) | |
| download | linux-8f92b56d228d8fa4d372f7b410c1ced1e92eb664.tar.gz linux-8f92b56d228d8fa4d372f7b410c1ced1e92eb664.zip | |
selftests/bpf: Test overlapping dynptr copies on xdp frags
Add dynptr tests for copies within one xdp packet with frags, where the
source and the destination overlap and the destination is above the
source:
- test_dynptr_copy_xdp_overlap: both ranges cross from the linear part
into frag0. bpf_dynptr_copy() of 1200 bytes with the destination 100
bytes above the source.
- test_dynptr_copy_xdp_overlap_src_linear: the source is in the linear
part and the destination crosses into frag0.
- test_dynptr_copy_xdp_overlap_dst_frag: the source crosses into frag0
and the destination is in frag0.
The new tests set err when the data is wrong. The existing
test_dynptr_copy_xdp does not, so it can pass on corrupted data.
Without the fix to bpf_dynptr_copy(), test_dynptr_copy_xdp_overlap
fails. With it, all the new tests pass.
Signed-off-by: Ayushman Rout <ayushmanrout27@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261026162810.12862-3-ayushmanrout27@gmail.com
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
