Lines Matching refs:prog

42 				     struct bpf_prog *prog,  in bpf_cgroup_storages_alloc()  argument
53 map = prog->aux->cgroup_storage[stype]; in bpf_cgroup_storages_alloc()
61 storages[stype] = bpf_cgroup_storage_alloc(prog, stype); in bpf_cgroup_storages_alloc()
126 if (pl->prog) in cgroup_bpf_release()
127 bpf_prog_put(pl->prog); in cgroup_bpf_release()
171 if (pl->prog) in prog_list_prog()
172 return pl->prog; in prog_list_prog()
174 return pl->link->link.prog; in prog_list_prog()
260 item->prog = prog_list_prog(pl); in compute_effective_progs()
383 struct bpf_prog *prog, in find_attach_entry() argument
398 if (prog && pl->prog == prog && prog != replace_prog) in find_attach_entry()
409 if (pl->prog == replace_prog) in find_attach_entry()
434 struct bpf_prog *prog, struct bpf_prog *replace_prog, in __cgroup_bpf_attach() argument
450 if (link && (prog || replace_prog)) in __cgroup_bpf_attach()
470 pl = find_attach_entry(progs, prog, link, replace_prog, in __cgroup_bpf_attach()
476 prog ? : link->link.prog, cgrp)) in __cgroup_bpf_attach()
480 old_prog = pl->prog; in __cgroup_bpf_attach()
490 pl->prog = prog; in __cgroup_bpf_attach()
508 pl->prog = old_prog; in __cgroup_bpf_attach()
560 WRITE_ONCE(item->prog, link->link.prog); in replace_effective_prog()
582 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace()
594 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace()
614 if (old_prog && link->prog != old_prog) { in cgroup_bpf_replace()
625 struct bpf_prog *prog, in find_detach_entry() argument
642 if (!prog && !link) in find_detach_entry()
650 if (pl->prog == prog && pl->link == link) in find_detach_entry()
667 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, in __cgroup_bpf_detach() argument
676 if (prog && link) in __cgroup_bpf_detach()
680 pl = find_detach_entry(progs, prog, link, flags & BPF_F_ALLOW_MULTI); in __cgroup_bpf_detach()
685 old_prog = pl->prog; in __cgroup_bpf_detach()
686 pl->prog = NULL; in __cgroup_bpf_detach()
706 pl->prog = old_prog; in __cgroup_bpf_detach()
720 struct bpf_prog *prog; in __cgroup_bpf_query() local
751 prog = prog_list_prog(pl); in __cgroup_bpf_query()
752 id = prog->aux->id; in __cgroup_bpf_query()
763 enum bpf_prog_type ptype, struct bpf_prog *prog) in cgroup_bpf_prog_attach() argument
782 ret = cgroup_bpf_attach(cgrp, prog, replace_prog, NULL, in cgroup_bpf_prog_attach()
793 struct bpf_prog *prog; in cgroup_bpf_prog_detach() local
801 prog = bpf_prog_get_type(attr->attach_bpf_fd, ptype); in cgroup_bpf_prog_detach()
802 if (IS_ERR(prog)) in cgroup_bpf_prog_detach()
803 prog = NULL; in cgroup_bpf_prog_detach()
805 ret = cgroup_bpf_detach(cgrp, prog, attr->attach_type); in cgroup_bpf_prog_detach()
806 if (prog) in cgroup_bpf_prog_detach()
807 bpf_prog_put(prog); in cgroup_bpf_prog_detach()
904 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in cgroup_bpf_link_attach() argument
924 prog); in cgroup_bpf_link_attach()
1146 cgroup_base_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_base_func_proto() argument
1163 cgroup_dev_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_dev_func_proto() argument
1165 return cgroup_base_func_proto(func_id, prog); in cgroup_dev_func_proto()
1170 const struct bpf_prog *prog, in cgroup_dev_is_valid_access() argument
1639 sysctl_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in sysctl_func_proto() argument
1655 return cgroup_base_func_proto(func_id, prog); in sysctl_func_proto()
1660 const struct bpf_prog *prog, in sysctl_is_valid_access() argument
1689 struct bpf_prog *prog, u32 *target_size) in sysctl_convert_ctx_access() argument
1758 cg_sockopt_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cg_sockopt_func_proto() argument
1772 return cgroup_base_func_proto(func_id, prog); in cg_sockopt_func_proto()
1778 const struct bpf_prog *prog, in cg_sockopt_is_valid_access() argument
1794 return prog->expected_attach_type == in cg_sockopt_is_valid_access()
1801 return prog->expected_attach_type == in cg_sockopt_is_valid_access()
1829 return prog->expected_attach_type == BPF_CGROUP_GETSOCKOPT; in cg_sockopt_is_valid_access()
1846 struct bpf_prog *prog, in cg_sockopt_convert_ctx_access() argument
1892 const struct bpf_prog *prog) in cg_sockopt_get_prologue() argument