• Home
  • Raw
  • Download

Lines Matching refs:atype

32 		      enum cgroup_bpf_attach_type atype,  in bpf_prog_run_array_cg()  argument
46 array = rcu_dereference(cgrp->effective[atype]); in bpf_prog_run_array_cg()
283 unsigned int atype; in cgroup_bpf_release() local
287 for (atype = 0; atype < ARRAY_SIZE(cgrp->bpf.progs); atype++) { in cgroup_bpf_release()
288 struct hlist_head *progs = &cgrp->bpf.progs[atype]; in cgroup_bpf_release()
305 static_branch_dec(&cgroup_bpf_enabled_key[atype]); in cgroup_bpf_release()
308 cgrp->bpf.effective[atype], in cgroup_bpf_release()
373 enum cgroup_bpf_attach_type atype) in hierarchy_allows_attach() argument
381 u32 flags = p->bpf.flags[atype]; in hierarchy_allows_attach()
386 cnt = prog_list_length(&p->bpf.progs[atype]); in hierarchy_allows_attach()
402 enum cgroup_bpf_attach_type atype, in compute_effective_progs() argument
413 if (cnt == 0 || (p->bpf.flags[atype] & BPF_F_ALLOW_MULTI)) in compute_effective_progs()
414 cnt += prog_list_length(&p->bpf.progs[atype]); in compute_effective_progs()
426 if (cnt > 0 && !(p->bpf.flags[atype] & BPF_F_ALLOW_MULTI)) in compute_effective_progs()
429 hlist_for_each_entry(pl, &p->bpf.progs[atype], node) { in compute_effective_progs()
446 enum cgroup_bpf_attach_type atype, in activate_effective_progs() argument
449 old_array = rcu_replace_pointer(cgrp->bpf.effective[atype], old_array, in activate_effective_progs()
505 enum cgroup_bpf_attach_type atype) in update_effective_progs() argument
517 err = compute_effective_progs(desc, atype, &desc->bpf.inactive); in update_effective_progs()
534 activate_effective_progs(desc, atype, desc->bpf.inactive); in update_effective_progs()
617 enum cgroup_bpf_attach_type atype; in __cgroup_bpf_attach() local
633 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
634 if (atype < 0) in __cgroup_bpf_attach()
637 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_attach()
639 if (!hierarchy_allows_attach(cgrp, atype)) in __cgroup_bpf_attach()
642 if (!hlist_empty(progs) && cgrp->bpf.flags[atype] != saved_flags) in __cgroup_bpf_attach()
685 cgrp->bpf.flags[atype] = saved_flags; in __cgroup_bpf_attach()
688 err = bpf_trampoline_link_cgroup_shim(new_prog, atype); in __cgroup_bpf_attach()
693 err = update_effective_progs(cgrp, atype); in __cgroup_bpf_attach()
702 static_branch_inc(&cgroup_bpf_enabled_key[atype]); in __cgroup_bpf_attach()
742 enum cgroup_bpf_attach_type atype, in replace_effective_prog() argument
761 if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI)) in replace_effective_prog()
764 head = &cg->bpf.progs[atype]; in replace_effective_prog()
776 desc->bpf.effective[atype], in replace_effective_prog()
796 enum cgroup_bpf_attach_type atype; in __cgroup_bpf_replace() local
802 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
803 if (atype < 0) in __cgroup_bpf_replace()
806 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_replace()
821 replace_effective_prog(cgrp, atype, link); in __cgroup_bpf_replace()
894 enum cgroup_bpf_attach_type atype) in purge_effective_progs() argument
912 if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI)) in purge_effective_progs()
915 head = &cg->bpf.progs[atype]; in purge_effective_progs()
929 desc->bpf.effective[atype], in purge_effective_progs()
952 enum cgroup_bpf_attach_type atype; in __cgroup_bpf_detach() local
964 atype = bpf_cgroup_atype_find(type, attach_btf_id); in __cgroup_bpf_detach()
965 if (atype < 0) in __cgroup_bpf_detach()
968 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_detach()
969 flags = cgrp->bpf.flags[atype]; in __cgroup_bpf_detach()
984 if (update_effective_progs(cgrp, atype)) { in __cgroup_bpf_detach()
988 purge_effective_progs(cgrp, old_prog, link, atype); in __cgroup_bpf_detach()
997 cgrp->bpf.flags[atype] = 0; in __cgroup_bpf_detach()
1003 static_branch_dec(&cgroup_bpf_enabled_key[atype]); in __cgroup_bpf_detach()
1027 enum cgroup_bpf_attach_type atype; in __cgroup_bpf_query() local
1052 for (atype = from_atype; atype <= to_atype; atype++) { in __cgroup_bpf_query()
1054 effective = rcu_dereference_protected(cgrp->bpf.effective[atype], in __cgroup_bpf_query()
1058 total_cnt += prog_list_length(&cgrp->bpf.progs[atype]); in __cgroup_bpf_query()
1077 for (atype = from_atype; atype <= to_atype && total_cnt; atype++) { in __cgroup_bpf_query()
1079 effective = rcu_dereference_protected(cgrp->bpf.effective[atype], in __cgroup_bpf_query()
1089 progs = &cgrp->bpf.progs[atype]; in __cgroup_bpf_query()
1102 flags = cgrp->bpf.flags[atype]; in __cgroup_bpf_query()
1358 enum cgroup_bpf_attach_type atype) in __cgroup_bpf_run_filter_skb() argument
1380 if (atype == CGROUP_INET_EGRESS) { in __cgroup_bpf_run_filter_skb()
1384 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, skb, in __cgroup_bpf_run_filter_skb()
1410 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, in __cgroup_bpf_run_filter_skb()
1438 enum cgroup_bpf_attach_type atype) in __cgroup_bpf_run_filter_sk() argument
1442 return bpf_prog_run_array_cg(&cgrp->bpf, atype, sk, bpf_prog_run, 0, in __cgroup_bpf_run_filter_sk()
1464 enum cgroup_bpf_attach_type atype, in __cgroup_bpf_run_filter_sock_addr() argument
1488 return bpf_prog_run_array_cg(&cgrp->bpf, atype, &ctx, bpf_prog_run, in __cgroup_bpf_run_filter_sock_addr()
1511 enum cgroup_bpf_attach_type atype) in __cgroup_bpf_run_filter_sock_ops() argument
1515 return bpf_prog_run_array_cg(&cgrp->bpf, atype, sock_ops, bpf_prog_run, in __cgroup_bpf_run_filter_sock_ops()
1521 short access, enum cgroup_bpf_attach_type atype) in __cgroup_bpf_check_dev_permission() argument
1533 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, &ctx, bpf_prog_run, 0, in __cgroup_bpf_check_dev_permission()
1684 enum cgroup_bpf_attach_type atype) in __cgroup_bpf_run_filter_sysctl() argument
1724 ret = bpf_prog_run_array_cg(&cgrp->bpf, atype, &ctx, bpf_prog_run, 0, in __cgroup_bpf_run_filter_sysctl()