summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorKaitao Cheng <chengkaitao@kylinos.cn>2026-05-21 06:23:01 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-05-21 12:47:45 +0300
commit7c8c71591b768284caa81e92cb47a6912952d3f2 (patch)
tree656b42dfe2682f6701d7898f6b5686805ef6e872 /lib/debugobjects.c
parentcfa6afa4b931aed08288454943e5077f114fd7f3 (diff)
downloadlinux-7c8c71591b768284caa81e92cb47a6912952d3f2.tar.xz
bpf: allow non-owning list-node args via __nonown_allowed
KF_ARG_PTR_TO_LIST_NODE normally requires an owning reference (PTR_TO_BTF_ID | MEM_ALLOC with ref_obj_id). Introduce the __nonown_allowed annotation on selected list-node arguments so non-owning references with ref_obj_id==0 are accepted as well. This patch only adds the generic verifier support and documents the annotation. Later patches in the series will apply it to bpf_list_add /del(), and bpf_list_is_first/last(), allowing bpf_list_front/back() results to be used as the insertion point, deletion target, or query target for those kfuncs. Verifier keeps existing owning-ref checks by default; only arguments annotated with __nonown_allowed bypass MEM_ALLOC/ref_obj_id checks and then follow the same list-node validation path. Signed-off-by: Kaitao Cheng <chengkaitao@kylinos.cn> Reviewed-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20260521032306.97118-4-kaitao.cheng@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions