Home
last modified time | relevance | path

Searched refs:fd_array (Results 1 – 15 of 15) sorted by relevance

/linux/tools/testing/selftests/net/
H A Dbind_bhash.c28 static int fd_array[MAX_THREADS][MAX_CONNECTIONS]; variable
115 pthread_create(&tid[i], NULL, setup, fd_array[i]); in main()
141 close(fd_array[i][j]); in main()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dfd_array.c98 static int __load_test_prog(int map_fd, const int *fd_array, int fd_array_cnt) in __load_test_prog() argument
112 opts.fd_array = fd_array; in __load_test_prog()
118 static int load_test_prog(const int *fd_array, int fd_array_cnt) in load_test_prog() argument
127 ret = __load_test_prog(map_fd, fd_array, fd_array_cnt); in load_test_prog()
H A Dsigned_loader.c50 attr.fd_array = ptr_to_u64(&map_fd); in load_loader()
97 attr.fd_array = ptr_to_u64(&map_fd); in run_gen_loader()
503 attr.fd_array = ptr_to_u64(fds); in signed_btf_fd_array_rejected()
1397 attr.fd_array = ptr_to_u64(&map_fd); in loadtime_drive()
1700 attr.fd_array = ptr_to_u64(&map_fd); in signed_sparse_fd_array_rejected()
1760 attr.fd_array = ptr_to_u64(fds); in signed_module_kfunc_rejected()
/linux/tools/perf/tests/shell/
H A Dtest_intel_pt.sh147 fd_array[fd] = fd
157 if (fd in fd_array) {
171 if (fd in fd_array) {
172 if (fd_to in fd_array) {
185 print "Checking " length(fd_array) " fds"
186 for (fd in fd_array) {
/linux/tools/testing/selftests/bpf/
H A Dtest_verifier.c968 static void fixup_prog_kfuncs(struct bpf_insn *prog, int *fd_array, in fixup_prog_kfuncs() argument
996 *fd_array = btf__fd(testmod_btf); in fixup_prog_kfuncs()
1008 struct bpf_insn *prog, int *map_fds, int *fd_array) in do_test_fixup() argument
1233 fixup_prog_kfuncs(prog, fd_array, test->fixup_kfunc_btf_id); in do_test_fixup()
1514 int fd_array[2] = { -1, -1 }; in do_test_single() local
1535 do_test_fixup(test, prog_type, prog, map_fds, &fd_array[1]); in do_test_single()
1569 if (fd_array[1] != -1) in do_test_single()
1570 opts.fd_array = &fd_array[0]; in do_test_single()
/linux/Documentation/bpf/
H A Dsigning.rst86 into ``fd_array`` (``BPF_PSEUDO_MAP_IDX_VALUE``), not by a baked-in file
128 reuses the existing ``fd_array``:
133 set, the metadata map referenced through ``fd_array``, and ``fd_array_cnt``
136 has resolved the ``fd_array`` entries into the program's ``used_maps``. The
138 binds - a single resolution of ``fd_array``, not a separate read, so the
161 There is no third shape: a non-exclusive map in a signed program's ``fd_array``
166 verifier as usual; because that check runs while ``fd_array`` is resolved -
174 directly-referenced fd, or a map swapped into an ``fd_array`` slot the loader
177 ksym or a BTF fd in ``fd_array``, whether resolved up front or lazily for a
181 substituted at an ``fd_array`` slot. Non-exclusive maps are never folded, so a
[all …]
H A Dlinux-notes.rst28 Linux uses an fd_array to store maps associated with a BPF program. Thus,
/linux/tools/lib/bpf/
H A Dbpf_gen_internal.h52 int fd_array; member
H A Dgen_loader.c47 return gen->fd_array + index * sizeof(int); in blob_fd_array_off()
120 gen->fd_array = add_data(gen, NULL, MAX_FD_ARRAY_SZ * sizeof(int)); in bpf_gen__init()
202 return (cur - gen->fd_array) / sizeof(int); in add_kfunc_btf_fd()
1089 emit_rel_store(gen, attr_field(prog_load_attr, fd_array), gen->fd_array); in bpf_gen__prog_load()
H A Dskel_internal.h402 attr.fd_array = (long) &map_fd; in bpf_load_and_run()
H A Dlibbpf.c760 int *fd_array; member
8021 load_attr.fd_array = obj->fd_array; in bpf_object_load_prog()
8849 ret = libbpf_ensure_mem((void **)&obj->fd_array, &obj->fd_array_cap, sizeof(int), in bpf_object__resolve_ksym_func_btf_id()
8855 obj->fd_array[obj->fd_array_cnt++] = mod_btf->fd; in bpf_object__resolve_ksym_func_btf_id()
9086 zfree(&obj->fd_array); in bpf_object_post_load_cleanup()
10018 attr.fd_array = OPTS_GET(opts, fd_array, NULL) ?: obj->fd_array; in bpf_program__clone()
/linux/kernel/bpf/
H A Dverifier.c2559 btf = fd_slot_btf(env->fd_array[idx]); in fd_array_get_btf_continuous()
2591 if (env->fd_array) in fd_array_get_btf()
18792 map = fd_slot_map(env->fd_array[idx]); in fd_array_get_map_idx_continuous()
18812 if (env->fd_array) in fd_array_get_map_idx()
20500 fd_slot_set_map(&env->fd_array[idx], map); in add_fd_from_fd_array()
20510 fd_slot_set_btf(&env->fd_array[idx], btf); in add_fd_from_fd_array()
20528 bpfptr_t fd_array, u32 cnt) in process_fd_array_continuous() argument
20539 env->fd_array = kvcalloc(cnt, sizeof(*env->fd_array), in process_fd_array_continuous()
20541 if (!env->fd_array) in process_fd_array_continuous()
20545 if (copy_from_bpfptr_offset(&fd, fd_array, in process_fd_array_continuous()
[all …]
/linux/include/linux/
H A Dbpf_verifier.h1017 struct bpf_fd_array *fd_array; member
/linux/tools/include/uapi/linux/
H A Dbpf.h1640 __aligned_u64 fd_array; /* array of FDs */ member
/linux/include/uapi/linux/
H A Dbpf.h1640 __aligned_u64 fd_array; /* array of FDs */ member