/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
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 156 BPF_F_QUERY_EFFECTIVE, NULL, NULL, &prog_cnt)); in serial_test_cgroup_attach_multi() 157 CHECK_FAIL(prog_cnt != 4); in serial_test_cgroup_attach_multi() 161 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 162 CHECK_FAIL(prog_cnt != 4); in serial_test_cgroup_attach_multi() 167 prog_cnt = 2; in serial_test_cgroup_attach_multi() 170 prog_ids, &prog_cnt) >= 0); in serial_test_cgroup_attach_multi() 172 CHECK_FAIL(prog_cnt != 4); in serial_test_cgroup_attach_multi() 178 prog_ids, &prog_cnt)); in serial_test_cgroup_attach_multi() 179 CHECK_FAIL(prog_cnt != 1); in serial_test_cgroup_attach_multi() [all …]
|
D | helper_restricted.c | 8 int prog_i = 0, prog_cnt; in test_helper_restricted() local 18 prog_cnt = test->skeleton->prog_cnt; in test_helper_restricted() 20 for (int j = 0; j < prog_cnt; ++j) { in test_helper_restricted() 30 } while (++prog_i < prog_cnt); in test_helper_restricted()
|
D | cgroup_link.c | 41 __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() 79 if (CHECK(prog_cnt != 1, "effect_cnt", "exp %d, got %d\n", 1, prog_cnt)) in serial_test_cgroup_link() 85 &prog_cnt); in serial_test_cgroup_link() 87 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in serial_test_cgroup_link() 88 cg_nr, prog_cnt)) in serial_test_cgroup_link() 94 &prog_cnt); in serial_test_cgroup_link() 96 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in serial_test_cgroup_link() 97 cg_nr, prog_cnt)) in serial_test_cgroup_link() 99 for (i = 1; i < prog_cnt; i++) { in serial_test_cgroup_link()
|
D | tp_attach_query.c | 75 if (CHECK(err || query->prog_cnt != 0, in serial_test_tp_attach_query() 78 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 91 if (CHECK(err || query->prog_cnt != 2, in serial_test_tp_attach_query() 94 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 109 if (CHECK(!err || errno != ENOSPC || query->prog_cnt != 2, in serial_test_tp_attach_query() 112 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 118 if (CHECK(err || query->prog_cnt != (i + 1), in serial_test_tp_attach_query() 121 err, errno, query->prog_cnt)) in serial_test_tp_attach_query()
|
D | fexit_bpf2bpf.c | 12 static int check_data_map(struct bpf_object *obj, int prog_cnt, bool reset) in check_data_map() argument 20 result = malloc((prog_cnt + 32 /* spare */) * sizeof(__u64)); in check_data_map() 37 for (i = 0; i < prog_cnt; i++) { in check_data_map() 58 int prog_cnt, in test_fexit_bpf2bpf_common() argument 89 link = calloc(sizeof(struct bpf_link *), prog_cnt); in test_fexit_bpf2bpf_common() 93 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common() 110 for (i = 0; i < prog_cnt; i++) { in test_fexit_bpf2bpf_common() 162 if (check_data_map(obj, prog_cnt, false)) in test_fexit_bpf2bpf_common() 166 for (i = 0; i < prog_cnt; i++) in test_fexit_bpf2bpf_common()
|
D | cgroup_attach_autodetach.c | 26 __u32 duration = 0, prog_cnt = 4, attach_flags; in serial_test_cgroup_attach_autodetach() local 60 prog_ids, &prog_cnt), in serial_test_cgroup_attach_autodetach()
|
D | lsm_cgroup.c | 28 return p.prog_cnt; in query_prog_cnt() 39 p.prog_ids = malloc(sizeof(u32) * p.prog_cnt); in query_prog_cnt() 40 p.prog_attach_flags = malloc(sizeof(u32) * p.prog_cnt); in query_prog_cnt() 43 for (i = 0; i < p.prog_cnt; i++) { in query_prog_cnt()
|
D | sockmap_basic.c | 321 __u32 prog_cnt = 3; in test_sockmap_progs_query() local 335 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query() 338 ASSERT_EQ(prog_cnt, 0, "wrong program count on query"); in test_sockmap_progs_query() 344 prog_cnt = 1; in test_sockmap_progs_query() 346 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query() 349 ASSERT_EQ(prog_cnt, 1, "wrong program count on query"); in test_sockmap_progs_query()
|
D | unpriv_bpf_disabled.c | 158 __u32 prog_cnt = 3; in test_unpriv_bpf_disabled_negative() local 204 &prog_cnt), -EPERM, "prog_query_fails"); in test_unpriv_bpf_disabled_negative()
|
D | flow_dissector_reattach.c | 24 __u32 prog_cnt = ARRAY_SIZE(prog_ids); in query_attached_prog_id() local 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 | sk_lookup.c | 521 __u32 prog_cnt = 3; in query_lookup_prog() local 543 &attach_flags, prog_ids, &prog_cnt); in query_lookup_prog() 553 if (CHECK(prog_cnt != 3, "bpf_prog_query", in query_lookup_prog() 554 "wrong program count on query: %u", prog_cnt)) in query_lookup_prog()
|
/linux-6.6.21/tools/testing/selftests/bpf/ |
D | test_lirc_mode2_user.c | 55 u32 prog_ids[10], prog_flags[10], prog_cnt; in main() local 88 prog_cnt = 10; in main() 90 &prog_cnt); in main() 96 if (prog_cnt != 0) { in main() 156 prog_cnt = 10; in main() 158 &prog_cnt); in main() 164 if (prog_cnt != 1) { in main()
|
D | test_dev_cgroup.c | 28 __u32 prog_cnt; in main() local 52 &prog_cnt)) { in main()
|
/linux-6.6.21/samples/bpf/ |
D | test_cgrp2_sock2.c | 35 int cg_fd, err, ret = EXIT_FAILURE, filter_id = 0, prog_cnt = 0; in main() local 61 progs[prog_cnt] = prog; in main() 62 prog_cnt++; in main() 65 if (filter_id >= prog_cnt) { in main()
|
/linux-6.6.21/tools/bpf/bpftool/ |
D | cgroup.c | 171 __u32 prog_cnt = 0; in count_attached_bpf_progs() local 175 NULL, &prog_cnt); in count_attached_bpf_progs() 179 return prog_cnt; in count_attached_bpf_progs() 211 p.prog_cnt = ARRAY_SIZE(prog_ids); in show_effective_bpf_progs() 218 if (p.prog_cnt == 0) in show_effective_bpf_progs() 221 for (iter = 0; iter < p.prog_cnt; iter++) in show_effective_bpf_progs() 239 p.prog_cnt = ARRAY_SIZE(prog_ids); in show_attached_bpf_progs() 247 if (p.prog_cnt == 0) in show_attached_bpf_progs() 250 for (iter = 0; iter < p.prog_cnt; iter++) { in show_attached_bpf_progs()
|
D | gen.c | 863 codegen_progs_skeleton(struct bpf_object *obj, size_t prog_cnt, bool populate_links) in codegen_progs_skeleton() argument 868 if (!prog_cnt) in codegen_progs_skeleton() 883 prog_cnt in codegen_progs_skeleton() 909 size_t map_cnt = 0, prog_cnt = 0, file_sz, mmap_sz; in do_skeleton() local 996 prog_cnt++; in do_skeleton() 1049 if (prog_cnt) { in do_skeleton() 1207 codegen_progs_skeleton(obj, prog_cnt, true /*populate_links*/); in do_skeleton() 1281 size_t i, len, file_sz, map_cnt = 0, prog_cnt = 0, mmap_sz, var_cnt = 0, var_idx = 0; in do_subskeleton() local 1375 prog_cnt++; in do_subskeleton() 1439 if (prog_cnt) { in do_subskeleton() [all …]
|
D | net.c | 576 __u32 prog_cnt; in query_flow_dissector() local 586 prog_cnt = ARRAY_SIZE(prog_ids); in query_flow_dissector() 588 &attach_flags, prog_ids, &prog_cnt); in query_flow_dissector() 602 if (prog_cnt == 1) in query_flow_dissector()
|
/linux-6.6.21/kernel/bpf/ |
D | net_namespace.c | 253 u32 prog_cnt = 0, flags = 0; in __netns_bpf_prog_query() local 258 prog_cnt = bpf_prog_array_length(run_array); in __netns_bpf_prog_query() 262 if (copy_to_user(&uattr->query.prog_cnt, &prog_cnt, sizeof(prog_cnt))) in __netns_bpf_prog_query() 264 if (!attr->query.prog_cnt || !prog_ids || !prog_cnt) in __netns_bpf_prog_query() 268 attr->query.prog_cnt); in __netns_bpf_prog_query()
|
D | cgroup.c | 1038 if (!effective_query && attr->query.prog_cnt && in __cgroup_bpf_query() 1067 if (copy_to_user(&uattr->query.prog_cnt, &total_cnt, sizeof(total_cnt))) in __cgroup_bpf_query() 1069 if (attr->query.prog_cnt == 0 || !prog_ids || !total_cnt) in __cgroup_bpf_query() 1073 if (attr->query.prog_cnt < total_cnt) { in __cgroup_bpf_query() 1074 total_cnt = attr->query.prog_cnt; in __cgroup_bpf_query()
|
/linux-6.6.21/drivers/media/rc/ |
D | bpf-lirc.c | 322 if (copy_to_user(&uattr->query.prog_cnt, &cnt, sizeof(cnt))) { in lirc_prog_query() 332 if (attr->query.prog_cnt != 0 && prog_ids && cnt) in lirc_prog_query() 334 attr->query.prog_cnt); in lirc_prog_query()
|
/linux-6.6.21/drivers/hid/bpf/ |
D | hid_bpf_jmp_table.c | 119 for (i = 0; i < prog_list->prog_cnt; i++) { in hid_bpf_prog_run() 182 new_list->prog_idx[new_list->prog_cnt++] = entry->idx; in hid_bpf_populate_hdev() 489 for (i = 0; i < prog_list->prog_cnt; i++) in __hid_bpf_destroy_device()
|
/linux-6.6.21/net/core/ |
D | sock_map.c | 1512 u32 prog_cnt = 0, flags = 0, ufd = attr->target_fd; in sock_map_bpf_prog_query() local 1535 prog_cnt = !prog ? 0 : 1; in sock_map_bpf_prog_query() 1537 if (!attr->query.prog_cnt || !prog_ids || !prog_cnt) in sock_map_bpf_prog_query() 1545 prog_cnt = 0; in sock_map_bpf_prog_query() 1552 copy_to_user(&uattr->query.prog_cnt, &prog_cnt, sizeof(prog_cnt))) in sock_map_bpf_prog_query()
|
/linux-6.6.21/include/linux/ |
D | hid_bpf.h | 125 u8 prog_cnt; member
|
/linux-6.6.21/tools/lib/bpf/ |
D | bpf.h | 560 __u32 prog_cnt; member 586 __u32 *prog_ids, __u32 *prog_cnt);
|
D | bpf.c | 935 __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) in bpf_prog_query() argument 942 opts.prog_cnt = *prog_cnt; in bpf_prog_query() 948 *prog_cnt = opts.prog_cnt; in bpf_prog_query()
|