]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Test overwriting referenced dynptr
authorAmery Hung <ameryhung@gmail.com>
Mon, 6 Apr 2026 15:05:48 +0000 (08:05 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 8 Apr 2026 01:20:49 +0000 (18:20 -0700)
commit4cfb09a38357dc1ae1082eb80aabd477d7c24b18
tree590e028c6fc8da35c26eb81087939bd7b79c4dda
parent017f5c4ef73c99ab4cdda3470a5310dc42094949
selftests/bpf: Test overwriting referenced dynptr

Test overwriting referenced dynptr and clones to make sure it is only
allow when there is at least one other dynptr with the same ref_obj_id.
Also make sure slice is still invalidated after the dynptr's stack slot
is destroyed.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20260406150548.1354271-3-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/dynptr_fail.c