summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2026-09-17 13:05:32 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-09-19 05:32:56 +0000
commit4d71b3e0821f71819090f1ab422937e543b839a8 (patch)
tree052067927f1160284982245d067f2189746ec946 /include/linux/debugobjects.h
parentc6dde091dc12f71d479d25345872b9aa3020fc60 (diff)
bpf: Add prog_list_init_item(), prog_list_replace_item(), and prog_list_id()
Add three helpers to abstract operations on a bpf_prog_list entry. Right now, bpf_prog_array_item is initialized from prog_list_prog(pl), which returns either pl->prog or pl->link->link.prog. This will not work when struct_ops is attached to a cgroup because the attachment is backed by a struct_ops map instead of a BPF prog. The same applies to __cgroup_bpf_query(). Instead of always copying a prog id to userspace, struct_ops cgroup attachment will need to copy the struct_ops map id. Refactor bpf_prog_array_item initialization into prog_list_init_item() and prog_list_replace_item(), and refactor id lookup into prog_list_id(). These helpers will be extended to support pl->link->map in a later patch. This is a no-op change. Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Amery Hung <ameryhung@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Link: https://patch.msgid.link/20260917200542.3689605-7-ameryhung@gmail.com
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions