]> Gentwo Git Trees - linux/.git/commit
selftests/bpf: Cover metadata access from a modified skb clone
authorJakub Sitnicki <jakub@cloudflare.com>
Thu, 14 Aug 2025 09:59:35 +0000 (11:59 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 18 Aug 2025 17:29:43 +0000 (10:29 -0700)
commit403fae59781fddc699af761f38ed024d3245096b
treeecf7140610fa5b609b05f14fc710de3f1ad3f57b
parentbd1b51b319788cbc5769a44f0081a1cb012f8ae4
selftests/bpf: Cover metadata access from a modified skb clone

Demonstrate that, when processing an skb clone, the metadata gets truncated
if the program contains a direct write to either the payload or the
metadata, due to an implicit unclone in the prologue, and otherwise the
dynptr to the metadata is limited to being read-only.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250814-skb-metadata-thru-dynptr-v7-9-8a39e636e0fb@cloudflare.com
tools/testing/selftests/bpf/config
tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c
tools/testing/selftests/bpf/progs/test_xdp_meta.c