]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: test for changing packet data from global functions
authorEduard Zingerman <eddyz87@gmail.com>
Wed, 30 Apr 2025 08:19:46 +0000 (16:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:43:54 +0000 (09:43 +0200)
commit85a30a46396a99d4ee864c871ec14533fcc769cc
tree6202ed37a2cd5dd643bf7e43971702b1f0845bdf
parent79751e9227a5910c0e5a2c7186877d91821d957d
selftests/bpf: test for changing packet data from global functions

commit 3f23ee5590d9605dbde9a5e1d4b97637a4803329 upstream.

Check if verifier is aware of packet pointers invalidation done in
global functions. Based on a test shared by Nick Zavaritsky in [0].

[0] https://lore.kernel.org/bpf/0498CA22-5779-4767-9C0C-A9515CEA711F@gmail.com/

Suggested-by: Nick Zavaritsky <mejedi@gmail.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20241210041100.1898468-5-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/progs/verifier_sock.c