Lines Matching refs:attr
764 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, in __cgroup_bpf_query() argument
767 __u32 __user *prog_ids = u64_to_user_ptr(attr->query.prog_ids); in __cgroup_bpf_query()
768 enum bpf_attach_type type = attr->query.attach_type; in __cgroup_bpf_query()
778 if (attr->query.query_flags & BPF_F_QUERY_EFFECTIVE) in __cgroup_bpf_query()
787 if (attr->query.prog_cnt == 0 || !prog_ids || !cnt) in __cgroup_bpf_query()
790 if (attr->query.prog_cnt < cnt) { in __cgroup_bpf_query()
791 cnt = attr->query.prog_cnt; in __cgroup_bpf_query()
795 if (attr->query.query_flags & BPF_F_QUERY_EFFECTIVE) { in __cgroup_bpf_query()
814 int cgroup_bpf_prog_attach(const union bpf_attr *attr, in cgroup_bpf_prog_attach() argument
821 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach()
825 if ((attr->attach_flags & BPF_F_ALLOW_MULTI) && in cgroup_bpf_prog_attach()
826 (attr->attach_flags & BPF_F_REPLACE)) { in cgroup_bpf_prog_attach()
827 replace_prog = bpf_prog_get_type(attr->replace_bpf_fd, ptype); in cgroup_bpf_prog_attach()
835 attr->attach_type, attr->attach_flags); in cgroup_bpf_prog_attach()
843 int cgroup_bpf_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype) in cgroup_bpf_prog_detach() argument
849 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach()
853 prog = bpf_prog_get_type(attr->attach_bpf_fd, ptype); in cgroup_bpf_prog_detach()
857 ret = cgroup_bpf_detach(cgrp, prog, attr->attach_type); in cgroup_bpf_prog_detach()
956 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in cgroup_bpf_link_attach() argument
963 if (attr->link_create.flags) in cgroup_bpf_link_attach()
966 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach()
978 link->type = attr->link_create.attach_type; in cgroup_bpf_link_attach()
1000 int cgroup_bpf_prog_query(const union bpf_attr *attr, in cgroup_bpf_prog_query() argument
1006 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
1010 ret = cgroup_bpf_query(cgrp, attr, uattr); in cgroup_bpf_prog_query()