/linux-6.1.9/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 | 69 if (CHECK(err || query->prog_cnt != 0, in serial_test_tp_attach_query() 72 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 85 if (CHECK(err || query->prog_cnt != 2, in serial_test_tp_attach_query() 88 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 103 if (CHECK(!err || errno != ENOSPC || query->prog_cnt != 2, in serial_test_tp_attach_query() 106 err, errno, query->prog_cnt)) in serial_test_tp_attach_query() 112 if (CHECK(err || query->prog_cnt != (i + 1), in serial_test_tp_attach_query() 115 err, errno, query->prog_cnt)) in serial_test_tp_attach_query()
|
D | fexit_bpf2bpf.c | 10 static int check_data_map(struct bpf_object *obj, int prog_cnt, bool reset) in check_data_map() argument 18 result = malloc((prog_cnt + 32 /* spare */) * sizeof(__u64)); in check_data_map() 35 for (i = 0; i < prog_cnt; i++) { in check_data_map() 56 int prog_cnt, in test_fexit_bpf2bpf_common() argument 87 link = calloc(sizeof(struct bpf_link *), prog_cnt); in test_fexit_bpf2bpf_common() 91 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common() 108 for (i = 0; i < prog_cnt; i++) { in test_fexit_bpf2bpf_common() 160 if (check_data_map(obj, prog_cnt, false)) in test_fexit_bpf2bpf_common() 164 for (i = 0; i < prog_cnt; i++) in test_fexit_bpf2bpf_common()
|
D | sockmap_basic.c | 316 __u32 prog_cnt = 3; in test_sockmap_progs_query() local 330 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query() 333 ASSERT_EQ(prog_cnt, 0, "wrong program count on query"); in test_sockmap_progs_query() 339 prog_cnt = 1; in test_sockmap_progs_query() 341 &attach_flags, prog_ids, &prog_cnt); in test_sockmap_progs_query() 344 ASSERT_EQ(prog_cnt, 1, "wrong program count on query"); in test_sockmap_progs_query()
|
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 | unpriv_bpf_disabled.c | 158 __u32 prog_cnt = 3; in test_unpriv_bpf_disabled_negative() local 200 &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.1.9/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()
|
D | veristat.c | 572 int err = 0, prog_cnt = 0; in process_obj() local 608 prog_cnt++; in process_obj() 611 if (prog_cnt == 1) { in process_obj()
|
/linux-6.1.9/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.1.9/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 | 864 codegen_progs_skeleton(struct bpf_object *obj, size_t prog_cnt, bool populate_links) in codegen_progs_skeleton() argument 869 if (!prog_cnt) in codegen_progs_skeleton() 884 prog_cnt in codegen_progs_skeleton() 910 size_t map_cnt = 0, prog_cnt = 0, file_sz, mmap_sz; in do_skeleton() local 998 prog_cnt++; in do_skeleton() 1051 if (prog_cnt) { in do_skeleton() 1209 codegen_progs_skeleton(obj, prog_cnt, true /*populate_links*/); in do_skeleton() 1280 size_t i, len, file_sz, map_cnt = 0, prog_cnt = 0, mmap_sz, var_cnt = 0, var_idx = 0; in do_subskeleton() local 1374 prog_cnt++; in do_subskeleton() 1438 if (prog_cnt) { in do_subskeleton() [all …]
|
D | net.c | 488 __u32 prog_cnt; in query_flow_dissector() local 498 prog_cnt = ARRAY_SIZE(prog_ids); in query_flow_dissector() 500 &attach_flags, prog_ids, &prog_cnt); in query_flow_dissector() 514 if (prog_cnt == 1) in query_flow_dissector()
|
/linux-6.1.9/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 | 1037 if (!effective_query && attr->query.prog_cnt && in __cgroup_bpf_query() 1066 if (copy_to_user(&uattr->query.prog_cnt, &total_cnt, sizeof(total_cnt))) in __cgroup_bpf_query() 1068 if (attr->query.prog_cnt == 0 || !prog_ids || !total_cnt) in __cgroup_bpf_query() 1072 if (attr->query.prog_cnt < total_cnt) { in __cgroup_bpf_query() 1073 total_cnt = attr->query.prog_cnt; in __cgroup_bpf_query()
|
/linux-6.1.9/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.1.9/tools/lib/bpf/ ! |
D | bpf.c | 836 attr.query.prog_cnt = OPTS_GET(opts, prog_cnt, 0); in bpf_prog_query_opts() 843 OPTS_SET(opts, prog_cnt, attr.query.prog_cnt); in bpf_prog_query_opts() 849 __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) in bpf_prog_query() argument 856 opts.prog_cnt = *prog_cnt; in bpf_prog_query() 862 *prog_cnt = opts.prog_cnt; in bpf_prog_query()
|
D | bpf.h | 379 __u32 prog_cnt; /* input+output argument */ member 389 __u32 *prog_ids, __u32 *prog_cnt);
|
D | libbpf.h | 1335 int prog_cnt; member 1363 int prog_cnt; member
|
/linux-6.1.9/net/core/ ! |
D | sock_map.c | 1492 u32 prog_cnt = 0, flags = 0, ufd = attr->target_fd; in sock_map_bpf_prog_query() local 1515 prog_cnt = !prog ? 0 : 1; in sock_map_bpf_prog_query() 1517 if (!attr->query.prog_cnt || !prog_ids || !prog_cnt) in sock_map_bpf_prog_query() 1525 prog_cnt = 0; in sock_map_bpf_prog_query() 1532 copy_to_user(&uattr->query.prog_cnt, &prog_cnt, sizeof(prog_cnt))) in sock_map_bpf_prog_query()
|