/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | tc_opts.c | 20 __u32 prog_ids[2]; in serial_test_tc_opts_basic() local 48 optq.prog_ids = prog_ids; in serial_test_tc_opts_basic() 50 memset(prog_ids, 0, sizeof(prog_ids)); in serial_test_tc_opts_basic() 51 optq.count = ARRAY_SIZE(prog_ids); in serial_test_tc_opts_basic() 59 ASSERT_EQ(optq.prog_ids[0], id1, "prog_ids[0]"); in serial_test_tc_opts_basic() 60 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_opts_basic() 75 memset(prog_ids, 0, sizeof(prog_ids)); in serial_test_tc_opts_basic() 76 optq.count = ARRAY_SIZE(prog_ids); in serial_test_tc_opts_basic() 84 ASSERT_EQ(optq.prog_ids[0], id2, "prog_ids[0]"); in serial_test_tc_opts_basic() 85 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_opts_basic() [all …]
|
D | tc_netkit.c | 167 __u32 prog_ids[2], link_ids[2]; in serial_test_tc_netkit_basic() local 213 optq.prog_ids = prog_ids; in serial_test_tc_netkit_basic() 216 memset(prog_ids, 0, sizeof(prog_ids)); in serial_test_tc_netkit_basic() 218 optq.count = ARRAY_SIZE(prog_ids); in serial_test_tc_netkit_basic() 226 ASSERT_EQ(optq.prog_ids[0], pid1, "prog_ids[0]"); in serial_test_tc_netkit_basic() 228 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_netkit_basic() 249 memset(prog_ids, 0, sizeof(prog_ids)); in serial_test_tc_netkit_basic() 251 optq.count = ARRAY_SIZE(prog_ids); in serial_test_tc_netkit_basic() 259 ASSERT_EQ(optq.prog_ids[0], pid2, "prog_ids[0]"); in serial_test_tc_netkit_basic() 261 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_netkit_basic() [all …]
|
D | tc_links.c | 20 __u32 prog_ids[2], link_ids[2]; in serial_test_tc_links_basic() local 52 optq.prog_ids = prog_ids; in serial_test_tc_links_basic() 55 memset(prog_ids, 0, sizeof(prog_ids)); in serial_test_tc_links_basic() 57 optq.count = ARRAY_SIZE(prog_ids); in serial_test_tc_links_basic() 65 ASSERT_EQ(optq.prog_ids[0], pid1, "prog_ids[0]"); in serial_test_tc_links_basic() 67 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_links_basic() 88 memset(prog_ids, 0, sizeof(prog_ids)); in serial_test_tc_links_basic() 90 optq.count = ARRAY_SIZE(prog_ids); in serial_test_tc_links_basic() 98 ASSERT_EQ(optq.prog_ids[0], pid2, "prog_ids[0]"); in serial_test_tc_links_basic() 100 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_links_basic() [all …]
|
D | cgroup_attach_multi.c | 79 __u32 prog_ids[4], prog_cnt = 0, attach_flags, saved_prog_id; in serial_test_cgroup_attach_multi() local 161 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 164 saved_prog_id = prog_ids[0]; in serial_test_cgroup_attach_multi() 166 prog_ids[0] = 0; in serial_test_cgroup_attach_multi() 170 prog_ids, &prog_cnt) >= 0); in serial_test_cgroup_attach_multi() 174 CHECK_FAIL(prog_ids[0] != saved_prog_id); in serial_test_cgroup_attach_multi() 176 prog_ids[0] = 0; in serial_test_cgroup_attach_multi() 178 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 180 CHECK_FAIL(prog_ids[0] != saved_prog_id); in serial_test_cgroup_attach_multi() 275 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() [all …]
|
D | cgroup_attach_autodetach.c | 28 __u32 prog_ids[2] = {0}; in serial_test_cgroup_attach_autodetach() local 60 prog_ids, &prog_cnt), in serial_test_cgroup_attach_autodetach() 86 for (i = 0; i < ARRAY_SIZE(prog_ids); i++) { in serial_test_cgroup_attach_autodetach() 88 int fd = bpf_prog_get_fd_by_id(prog_ids[i]); in serial_test_cgroup_attach_autodetach()
|
D | cgroup_link.c | 41 __u32 prog_ids[ARRAY_SIZE(cgs)], prog_cnt = 0, attach_flags, prog_id; in serial_test_cgroup_link() local 93 BPF_F_QUERY_EFFECTIVE, NULL, prog_ids, in serial_test_cgroup_link() 100 CHECK(prog_ids[i - 1] != prog_ids[i], "prog_id_check", in serial_test_cgroup_link() 102 i, prog_ids[i - 1], prog_ids[i]); in serial_test_cgroup_link()
|
D | sk_lookup.c | 460 __u32 prog_ids[3] = {}; in query_lookup_prog() local 483 &attach_flags, prog_ids, &prog_cnt); in query_lookup_prog() 497 CHECK(prog_ids[0] != prog_id, "bpf_prog_query", in query_lookup_prog() 499 prog_ids[0], prog_id); in query_lookup_prog() 503 CHECK(prog_ids[1] != prog_id, "bpf_prog_query", in query_lookup_prog() 505 prog_ids[1], prog_id); in query_lookup_prog() 509 CHECK(prog_ids[2] != prog_id, "bpf_prog_query", in query_lookup_prog() 511 prog_ids[2], prog_id); in query_lookup_prog() 521 CHECK(prog_ids[0] != prog_id, "bpf_prog_query", in query_lookup_prog() 523 prog_ids[0], prog_id); in query_lookup_prog()
|
D | lsm_cgroup.c | 39 p.prog_ids = malloc(sizeof(u32) * p.prog_cnt); in query_prog_cnt() 48 fd = bpf_prog_get_fd_by_id(p.prog_ids[i]); in query_prog_cnt() 59 free(p.prog_ids); in query_prog_cnt()
|
D | flow_dissector_reattach.c | 23 __u32 prog_ids[1] = {}; in query_attached_prog_id() local 24 __u32 prog_cnt = ARRAY_SIZE(prog_ids); in query_attached_prog_id() 28 prog_ids, &prog_cnt); in query_attached_prog_id() 34 return prog_cnt == 1 ? prog_ids[0] : 0; in query_attached_prog_id()
|
D | unpriv_bpf_disabled.c | 158 __u32 prog_ids[3] = {}; in test_unpriv_bpf_disabled_negative() local 204 ASSERT_EQ(bpf_prog_query(prog_fd, BPF_TRACE_FENTRY, 0, &attach_flags, prog_ids, in test_unpriv_bpf_disabled_negative()
|
D | sockmap_basic.c | 413 __u32 prog_ids[3] = {}; in test_sockmap_progs_query() local 428 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query() 439 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query() 443 ASSERT_EQ(prog_ids[0], query_prog_id(verdict_fd), in test_sockmap_progs_query()
|
/linux-6.12.1/tools/bpf/bpftool/ |
D | cgroup.c | 240 __u32 prog_ids[1024] = {0}; in show_effective_bpf_progs() local 245 p.prog_cnt = ARRAY_SIZE(prog_ids); in show_effective_bpf_progs() 246 p.prog_ids = prog_ids; in show_effective_bpf_progs() 256 show_bpf_prog(prog_ids[iter], type, NULL, level); in show_effective_bpf_progs() 267 __u32 prog_ids[1024] = {0}; in show_attached_bpf_progs() local 273 p.prog_cnt = ARRAY_SIZE(prog_ids); in show_attached_bpf_progs() 274 p.prog_ids = prog_ids; in show_attached_bpf_progs() 304 show_bpf_prog(prog_ids[iter], type, in show_attached_bpf_progs()
|
D | net.c | 462 __u32 prog_ids[64] = {}, link_ids[64] = {}; in __show_dev_tc_bpf() local 467 optq.prog_ids = prog_ids; in __show_dev_tc_bpf() 471 optq.count = ARRAY_SIZE(prog_ids); in __show_dev_tc_bpf() 481 ret = __show_dev_tc_bpf_name(prog_ids[i], prog_name, in __show_dev_tc_bpf() 485 NET_DUMP_UINT("prog_id", " prog_id %u ", prog_ids[i]); in __show_dev_tc_bpf() 584 __u32 prog_ids[1]; in query_flow_dissector() local 595 prog_cnt = ARRAY_SIZE(prog_ids); in query_flow_dissector() 597 &attach_flags, prog_ids, &prog_cnt); in query_flow_dissector() 612 attach_info->flow_dissector_id = prog_ids[0]; in query_flow_dissector()
|
/linux-6.12.1/tools/testing/selftests/bpf/ |
D | test_lirc_mode2_user.c | 55 u32 prog_ids[10], prog_flags[10], prog_cnt; in main() local 89 ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids, in main() 157 ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids, in main()
|
/linux-6.12.1/drivers/media/rc/ |
D | bpf-lirc.c | 297 __u32 __user *prog_ids = u64_to_user_ptr(attr->query.prog_ids); in lirc_prog_query() local 332 if (attr->query.prog_cnt != 0 && prog_ids && cnt) in lirc_prog_query() 333 ret = bpf_prog_array_copy_to_user(progs, prog_ids, in lirc_prog_query()
|
/linux-6.12.1/kernel/bpf/ |
D | net_namespace.c | 251 __u32 __user *prog_ids = u64_to_user_ptr(attr->query.prog_ids); in __netns_bpf_prog_query() local 264 if (!attr->query.prog_cnt || !prog_ids || !prog_cnt) in __netns_bpf_prog_query() 267 return bpf_prog_array_copy_to_user(run_array, prog_ids, in __netns_bpf_prog_query()
|
D | cgroup.c | 1042 __u32 __user *prog_ids = u64_to_user_ptr(attr->query.prog_ids); in __cgroup_bpf_query() local 1056 prog_ids && !prog_attach_flags) in __cgroup_bpf_query() 1086 if (attr->query.prog_cnt == 0 || !prog_ids || !total_cnt) in __cgroup_bpf_query() 1100 ret = bpf_prog_array_copy_to_user(effective, prog_ids, cnt); in __cgroup_bpf_query() 1113 if (copy_to_user(prog_ids + i, &id, sizeof(id))) in __cgroup_bpf_query() 1130 prog_ids += cnt; in __cgroup_bpf_query()
|
D | core.c | 2532 u32 *prog_ids, in bpf_prog_array_copy_core() argument 2541 prog_ids[i] = item->prog->aux->id; in bpf_prog_array_copy_core() 2552 __u32 __user *prog_ids, u32 cnt) in bpf_prog_array_copy_to_user() argument 2568 err = copy_to_user(prog_ids, ids, cnt * sizeof(u32)); in bpf_prog_array_copy_to_user() 2716 u32 *prog_ids, u32 request_cnt, in bpf_prog_array_copy_info() argument 2731 return bpf_prog_array_copy_core(array, prog_ids, request_cnt) ? -ENOSPC in bpf_prog_array_copy_info()
|
D | mprog.c | 420 uprog_id = u64_to_user_ptr(attr->query.prog_ids); in bpf_mprog_query()
|
/linux-6.12.1/tools/lib/bpf/ |
D | bpf.h | 589 __u32 *prog_ids; member 618 __u32 *prog_ids, __u32 *prog_cnt);
|
D | bpf.c | 945 attr.query.prog_ids = ptr_to_u64(OPTS_GET(opts, prog_ids, NULL)); in bpf_prog_query_opts() 960 __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) in bpf_prog_query() argument 966 opts.prog_ids = prog_ids; in bpf_prog_query()
|
/linux-6.12.1/net/core/ |
D | sock_map.c | 1552 __u32 __user *prog_ids = u64_to_user_ptr(attr->query.prog_ids); in sock_map_bpf_prog_query() local 1577 if (!attr->query.prog_cnt || !prog_ids || !prog_cnt) in sock_map_bpf_prog_query() 1591 (id != 0 && copy_to_user(prog_ids, &id, sizeof(u32))) || in sock_map_bpf_prog_query()
|
/linux-6.12.1/include/linux/ |
D | bpf.h | 2048 __u32 __user *prog_ids, u32 cnt); 2056 u32 *prog_ids, u32 request_cnt,
|
/linux-6.12.1/include/uapi/linux/ |
D | bpf.h | 1656 __aligned_u64 prog_ids; member
|
/linux-6.12.1/tools/include/uapi/linux/ |
D | bpf.h | 1656 __aligned_u64 prog_ids; member
|