summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-11-02 17:09:58 +0000
committerAlexei Starovoitov <ast@kernel.org>2026-11-02 20:26:01 +0000
commitc820e6f70d12db780018234da79fe0c20d785052 (patch)
tree01728adb9dc2a074153fe6e0c4e7a22797577f5b /scripts/basic
parent51f6627d44f3b0e070f33187aa5192d6f8484be9 (diff)
downloadlinux-c820e6f70d12db780018234da79fe0c20d785052.tar.gz
linux-c820e6f70d12db780018234da79fe0c20d785052.zip
selftests/bpf: Test writes to the buffer of bpf_dynptr_slice_rdwr()
bpf_dynptr_slice_rdwr() and bpf_dynptr_slice() can return the buffer. When the buffer is on the stack, a store to the buffer invalidates the slice. See "bpf: Invalidate a dynptr slice when its stack buffer is written". dynptr_fail.c gets short progs with skb, xdp and file dynptrs. They cover the events that invalidate a slice, the borders of the buffer, a copy of the slice on the stack and in a caller, pruning, read-only slices, and events that leave the slice valid. They end with a load through the slice and are only loaded. test_dynptr_skb_slice_rdwr_buffer in dynptr_success.c runs on a non-linear skb. It shows that the slice is the buffer, and that the pattern of the documentation continues to work. It passes without the fix too. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261102170958.3586893-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions