]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Introduce struct bpf_map_desc in verifier
authorMykyta Yatsenko <yatsenko@meta.com>
Fri, 30 Jan 2026 20:42:10 +0000 (20:42 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 31 Jan 2026 05:13:48 +0000 (21:13 -0800)
commit98c4fd2963cb2bc5eae22b5365e6bbf3a5cd0f14
treee82c8fc8cf53f6bd51a9912b07c97a4a5b325aff
parentc7fbf8d9b808ff3774474be6313b79ea684c61a9
bpf: Introduce struct bpf_map_desc in verifier

Introduce struct bpf_map_desc to hold bpf_map pointer and map uid. Use
this struct in both bpf_call_arg_meta and bpf_kfunc_call_arg_meta
instead of having different representations:
 - bpf_call_arg_meta had separate map_ptr and map_uid fields
 - bpf_kfunc_call_arg_meta had an anonymous inline struct

This unifies the map fields layout across both metadata structures,
making the code more consistent and preparing for further refactoring of
map field pointer validation.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Link: https://lore.kernel.org/r/20260130-verif_special_fields-v2-1-2c59e637da7d@meta.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c