selftests/bpf: Test changing packet data from global functions with a kfunc
authorAmery Hung <ameryhung@gmail.com>
Thu, 25 Sep 2025 17:00:13 +0000 (10:00 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 25 Sep 2025 21:52:09 +0000 (14:52 -0700)
commit1193c46c1745cf809dead55ece4f3baa728f316c
treeec2e1986eed1c9071701b28738492bc8a77e17a7
parentbc8712f2b5250825968e6b0c3d2709a4b9d5d570
selftests/bpf: Test changing packet data from global functions with a kfunc

The verifier should invalidate all packet pointers after a packet data
changing kfunc is called. So, similar to commit 3f23ee5590d9
("selftests/bpf: test for changing packet data from global functions"),
test changing packet data from global functions to make sure packet
pointers are indeed invalidated.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250925170013.1752561-2-ameryhung@gmail.com
tools/testing/selftests/bpf/progs/verifier_sock.c