Home
last modified time | relevance | path

Searched refs:attach_flags (Results 1 – 17 of 17) sorted by relevance

/linux-6.1.9/tools/bpf/bpftool/
Dcgroup.c251 __u32 attach_flags; in show_attached_bpf_progs() local
253 attach_flags = prog_attach_flags[iter] ?: p.attach_flags; in show_attached_bpf_progs()
255 switch (attach_flags) { in show_attached_bpf_progs()
266 snprintf(buf, sizeof(buf), "unknown(%x)", attach_flags); in show_attached_bpf_progs()
514 int attach_flags = 0; in do_attach() local
543 attach_flags |= BPF_F_ALLOW_MULTI; in do_attach()
545 attach_flags |= BPF_F_ALLOW_OVERRIDE; in do_attach()
552 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
Dnet.c486 __u32 attach_flags; in query_flow_dissector() local
500 &attach_flags, prog_ids, &prog_cnt); in query_flow_dissector()
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dcgroup_attach_multi.c79 __u32 prog_ids[4], prog_cnt = 0, attach_flags, saved_prog_id; in serial_test_cgroup_attach_multi() local
160 BPF_F_QUERY_EFFECTIVE, &attach_flags, in serial_test_cgroup_attach_multi()
163 CHECK_FAIL(attach_flags != 0); in serial_test_cgroup_attach_multi()
169 BPF_F_QUERY_EFFECTIVE, &attach_flags, in serial_test_cgroup_attach_multi()
274 BPF_F_QUERY_EFFECTIVE, &attach_flags, in serial_test_cgroup_attach_multi()
277 CHECK_FAIL(attach_flags != 0); in serial_test_cgroup_attach_multi()
Dsockmap_basic.c314 __u32 attach_flags = 0; in test_sockmap_progs_query() local
330 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query()
332 ASSERT_EQ(attach_flags, 0, "wrong attach_flags on query"); in test_sockmap_progs_query()
341 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query()
343 ASSERT_EQ(attach_flags, 0, "wrong attach_flags on query"); in test_sockmap_progs_query()
Dcgroup_attach_autodetach.c26 __u32 duration = 0, prog_cnt = 4, attach_flags; in serial_test_cgroup_attach_autodetach() local
59 if (CHECK(bpf_prog_query(cg, BPF_CGROUP_INET_EGRESS, 0, &attach_flags, in serial_test_cgroup_attach_autodetach()
Dcgroup_link.c41 __u32 prog_ids[ARRAY_SIZE(cgs)], prog_cnt = 0, attach_flags, prog_id; in serial_test_cgroup_link() local
76 0, &attach_flags, NULL, &prog_cnt); in serial_test_cgroup_link()
78 CHECK_FAIL(attach_flags != BPF_F_ALLOW_MULTI); in serial_test_cgroup_link()
Dunpriv_bpf_disabled.c156 __u32 attach_flags = 0; in test_unpriv_bpf_disabled_negative() local
199 ASSERT_EQ(bpf_prog_query(prog_fd, BPF_TRACE_FENTRY, 0, &attach_flags, prog_ids, in test_unpriv_bpf_disabled_negative()
Dsk_lookup.c519 __u32 attach_flags = 0; in query_lookup_prog() local
543 &attach_flags, prog_ids, &prog_cnt); in query_lookup_prog()
550 if (CHECK(attach_flags != 0, "bpf_prog_query", in query_lookup_prog()
551 "wrong attach_flags on query: %u", attach_flags)) in query_lookup_prog()
/linux-6.1.9/drivers/media/rc/
Dbpf-lirc.c253 if (attr->attach_flags) in lirc_prog_attach()
273 if (attr->attach_flags) in lirc_prog_detach()
327 if (copy_to_user(&uattr->query.attach_flags, &flags, sizeof(flags))) { in lirc_prog_query()
/linux-6.1.9/tools/lib/bpf/
Dbpf.c637 attr.attach_flags = OPTS_GET(opts, flags, 0); in bpf_prog_attach_opts()
842 OPTS_SET(opts, attach_flags, attr.query.attach_flags); in bpf_prog_query_opts()
849 __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) in bpf_prog_query() argument
860 if (attach_flags) in bpf_prog_query()
861 *attach_flags = opts.attach_flags; in bpf_prog_query()
Dbpf.h377 __u32 attach_flags; /* output argument */ member
388 __u32 query_flags, __u32 *attach_flags,
/linux-6.1.9/kernel/bpf/
Dnet_namespace.c260 if (copy_to_user(&uattr->query.attach_flags, &flags, sizeof(flags))) in __netns_bpf_prog_query()
305 if (attr->target_fd || attr->attach_flags || attr->replace_bpf_fd) in netns_bpf_prog_attach()
Dcgroup.c1064 if (copy_to_user(&uattr->query.attach_flags, &flags, sizeof(flags))) in __cgroup_bpf_query()
1140 if ((attr->attach_flags & BPF_F_ALLOW_MULTI) && in cgroup_bpf_prog_attach()
1141 (attr->attach_flags & BPF_F_REPLACE)) { in cgroup_bpf_prog_attach()
1150 attr->attach_type, attr->attach_flags); in cgroup_bpf_prog_attach()
Dsyscall.c3468 if (attr->attach_flags & ~BPF_F_ATTACH_MASK) in bpf_prog_attach()
/linux-6.1.9/net/core/
Dsock_map.c69 if (attr->attach_flags || attr->replace_bpf_fd) in sock_map_get_from_fd()
89 if (attr->attach_flags || attr->replace_bpf_fd) in sock_map_prog_detach()
1530 if (copy_to_user(&uattr->query.attach_flags, &flags, sizeof(flags)) || in sock_map_bpf_prog_query()
/linux-6.1.9/tools/include/uapi/linux/
Dbpf.h1405 __u32 attach_flags; member
1458 __u32 attach_flags; member
/linux-6.1.9/include/uapi/linux/
Dbpf.h1405 __u32 attach_flags; member
1458 __u32 attach_flags; member