]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: ptr_to_btf_id struct walk ending with primitive pointer
authorEduard Zingerman <eddyz87@gmail.com>
Fri, 4 Jul 2025 23:03:49 +0000 (16:03 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 7 Jul 2025 15:25:06 +0000 (08:25 -0700)
commitf1f5d6f25d098e21b0a53237cfd055fc28787c46
tree11e699fbf5777708c73a16c003f657083138f308
parent2d5c91e1cc14c3511d163ac36ee869ecf3a29cc2
selftests/bpf: ptr_to_btf_id struct walk ending with primitive pointer

Validate that reading a PTR_TO_BTF_ID field produces a value of type
PTR_TO_MEM|MEM_RDONLY|PTR_UNTRUSTED, if field is a pointer to a
primitive type.

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250704230354.1323244-4-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/mem_rdonly_untrusted.c