Searched refs:btf (Results 1 - 25 of 154) sorted by relevance

1234567

/linux-master/tools/testing/selftests/bpf/
H A Dbtf_helpers.h7 #include <bpf/btf.h>
9 int fprintf_btf_type_raw(FILE *out, const struct btf *btf, __u32 id);
10 const char *btf_type_raw_dump(const struct btf *btf, int type_id);
11 int btf_validate_raw(struct btf *btf, int nr_types, const char *exp_types[]);
13 #define VALIDATE_RAW_BTF(btf, raw_types...) \
14 btf_validate_raw(btf, \
18 const char *btf_type_c_dump(const struct btf *bt
[all...]
H A Dbtf_helpers.c5 #include <bpf/btf.h>
81 static const char *btf_str(const struct btf *btf, __u32 off) argument
85 return btf__str_by_offset(btf, off) ?: "(invalid)";
88 int fprintf_btf_type_raw(FILE *out, const struct btf *btf, __u32 id) argument
94 t = btf__type_by_id(btf, id);
101 fprintf(out, "[%u] %s '%s'", id, btf_kind_str(kind), btf_str(btf, t->name_off));
135 btf_str(btf, m->name_off), m->type, bit_off);
150 btf_str(btf,
216 btf_type_raw_dump(const struct btf *btf, int type_id) argument
234 btf_validate_raw(struct btf *btf, int nr_types, const char *exp_types[]) argument
257 btf_type_c_dump(const struct btf *btf) argument
[all...]
/linux-master/kernel/trace/
H A Dtrace_btf.h2 #include <linux/btf.h>
5 struct btf **btf_p);
8 const struct btf_member *btf_find_struct_member(struct btf *btf,
H A Dtrace_btf.c2 #include <linux/btf.h>
9 * Find a function proto type by name, and return the btf_type with its btf
13 const struct btf_type *btf_find_func_proto(const char *func_name, struct btf **btf_p)
70 const struct btf_member *btf_find_struct_member(struct btf *btf, argument
94 if (btf_type_skip_modifiers(btf, member->type, &tid) &&
101 name = btf_name_by_offset(btf, member->name_off);
113 type = btf_type_by_id(btf, tid);
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dlinked_list.c2 #include <bpf/btf.h>
4 #include <linux/btf.h>
237 static struct btf *init_btf(void)
240 struct btf *btf; local
242 btf = btf__new_empty();
243 if (!ASSERT_OK_PTR(btf, "btf__new_empty"))
245 id = btf__add_int(btf, "int", 4, BTF_INT_SIGNED);
248 lid = btf__add_struct(btf, "bpf_spin_lock", 4);
251 hid = btf__add_struct(btf, "bpf_list_hea
266 struct btf *btf; local
318 struct btf *btf = NULL; local
[all...]
H A Dbtf_write.c4 #include <bpf/btf.h>
7 static void gen_btf(struct btf *btf) argument
17 str_off = btf__find_str(btf, "int");
20 str_off = btf__add_str(btf, "int");
23 str_off = btf__find_str(btf, "int");
27 id = btf__add_int(btf, "int", 4, BTF_INT_SIGNED);
30 t = btf__type_by_id(btf, 1);
33 ASSERT_STREQ(btf__str_by_offset(btf, t->name_off), "int", "int_name");
38 ASSERT_STREQ(btf_type_raw_dump(btf,
357 struct btf *btf; local
[all...]
H A Dlibbpf_str.c6 #include <bpf/btf.h>
23 struct btf *btf; local
28 btf = btf__parse("/sys/kernel/btf/vmlinux", NULL);
29 if (!ASSERT_OK_PTR(btf, "btf_parse"))
33 id = btf__find_by_name_kind(btf, "bpf_attach_type", BTF_KIND_ENUM);
36 t = btf__type_by_id(btf, id);
48 attach_type_name = btf__str_by_offset(btf, e->name_off);
59 btf__free(btf);
68 struct btf *btf; local
113 struct btf *btf; local
170 struct btf *btf; local
[all...]
H A Dbtf_dump.c3 #include <bpf/btf.h>
26 static int btf_dump_all_types(const struct btf *btf, void *ctx) argument
28 size_t type_cnt = btf__type_cnt(btf);
32 d = btf_dump__new(btf, btf_dump_printf, ctx, NULL);
51 struct btf *btf = NULL; local
57 btf = btf__parse_elf(test_file, NULL);
58 if (!ASSERT_OK_PTR(btf, "btf_parse_elf")) {
59 err = -PTR_ERR(btf);
135 struct btf *btf = NULL; local
269 btf_dump_data(struct btf *btf, struct btf_dump *d, char *name, char *prefix, __u64 flags, void *ptr, size_t ptr_sz, char *str, const char *expected_val) argument
350 test_btf_dump_int_data(struct btf *btf, struct btf_dump *d, char *str) argument
408 test_btf_dump_float_data(struct btf *btf, struct btf_dump *d, char *str) argument
453 test_btf_dump_char_data(struct btf *btf, struct btf_dump *d, char *str) argument
475 test_btf_dump_typedef_data(struct btf *btf, struct btf_dump *d, char *str) argument
530 test_btf_dump_enum_data(struct btf *btf, struct btf_dump *d, char *str) argument
566 test_btf_dump_struct_data(struct btf *btf, struct btf_dump *d, char *str) argument
801 test_btf_dump_var_data(struct btf *btf, struct btf_dump *d, char *str) argument
812 test_btf_datasec(struct btf *btf, struct btf_dump *d, char *str, const char *name, const char *expected_val, void *data, size_t data_sz) argument
840 struct btf *btf; local
863 struct btf *btf; local
[all...]
H A Dlibbpf_probes.c5 #include <bpf/btf.h>
9 struct btf *btf; local
14 btf = btf__parse("/sys/kernel/btf/vmlinux", NULL);
15 if (!ASSERT_OK_PTR(btf, "btf_parse"))
19 id = btf__find_by_name_kind(btf, "bpf_prog_type", BTF_KIND_ENUM);
22 t = btf__type_by_id(btf, id);
27 const char *prog_type_name = btf__str_by_offset(btf, e->name_off);
44 btf__free(btf);
49 struct btf *btf; local
[all...]
H A Dtest_global_funcs.c26 static void check_ctx_arg_type(const struct btf *btf, const struct btf_param *p) argument
31 t = btf__type_by_id(btf, p->type);
35 s = btf_type_raw_dump(btf, t->type);
47 struct btf *btf = NULL; local
50 struct btf *kern_btf = NULL;
87 btf = btf__load_from_kernel_by_id(info.btf_id);
88 if (!ASSERT_OK_PTR(btf, "obj_kern_btf"))
99 fn_t = btf__type_by_id(btf, re
[all...]
H A Dbtf_endian.c7 #include <bpf/btf.h>
18 struct btf *btf = NULL, *swap_btf = NULL; local
26 btf = btf__parse_elf("btf_dump_test_case_syntax.bpf.o", NULL);
27 if (!ASSERT_OK_PTR(btf, "parse_native_btf"))
30 ASSERT_EQ(btf__endianness(btf), endian, "endian");
31 btf__set_endianness(btf, swap_endian);
32 ASSERT_EQ(btf__endianness(btf), swap_endian, "endian");
35 raw_data = btf__raw_data(btf, &raw_sz);
45 ASSERT_EQ(btf__type_cnt(swap_btf), btf__type_cnt(btf), "nr_type
[all...]
H A Dbtf_module.c5 #include <bpf/btf.h>
12 struct btf *vmlinux_btf, *module_btf;
H A Dtest_bpf_ma.c7 #include <bpf/btf.h>
16 struct btf *btf; local
24 btf = bpf_object__btf(skel->obj);
25 if (!ASSERT_OK_PTR(btf, "btf"))
30 id = btf__find_by_name_kind(btf, tname, BTF_KIND_STRUCT);
38 id = btf__find_by_name_kind(btf, tname, BTF_KIND_STRUCT);
H A Dresolve_btfids.c5 #include <bpf/btf.h>
7 #include <linux/btf.h>
66 __resolve_symbol(struct btf *btf, int type_id) argument
72 type = btf__type_by_id(btf, type_id);
85 str = btf__name_by_offset(btf, type->name_off);
100 struct btf *btf; local
104 btf = btf__parse_elf("btf_data.bpf.o", NULL);
105 if (CHECK(libbpf_get_error(btf), "resolv
[all...]
H A Dcore_autosize.c5 #include <bpf/btf.h>
53 char btf_file[] = "/tmp/core_autosize.btf.XXXXXX";
60 struct btf *btf = NULL; local
66 btf = btf__new_empty();
67 if (!ASSERT_OK_PTR(btf, "empty_btf"))
85 btf__set_pointer_size(btf, 4);
87 char_id = btf__add_int(btf, "unsigned char", 1, 0);
89 short_id = btf__add_int(btf, "unsigned short", 2, 0);
92 int_id = btf__add_int(btf, "lon
[all...]
H A Dbtf_dedup_split.c4 #include <bpf/btf.h>
9 struct btf *btf1, *btf2;
127 struct btf *btf1, *btf2;
225 struct btf *btf1, *btf2;
332 static void btf_add_dup_struct_in_cu(struct btf *btf, int start_id) argument
335 btf__set_pointer_size(btf, 8); /* enforce 64-bit arch */
337 btf__add_int(btf, "int", 4, BTF_INT_SIGNED); /* [1] int */
339 btf__add_struct(btf, "s", 8); /* [2] struct s { */
340 btf__add_field(btf, "
[all...]
/linux-master/tools/lib/bpf/
H A Dbtf.h10 #include <linux/btf.h>
23 struct btf;
36 * @param btf BTF object to free
38 LIBBPF_API void btf__free(struct btf *btf);
54 LIBBPF_API struct btf *btf__new(const void *data, __u32 size);
76 LIBBPF_API struct btf *btf__new_split(const void *data, __u32 size, struct btf *base_btf);
90 LIBBPF_API struct btf *btf__new_empty(void);
108 LIBBPF_API struct btf *btf__new_empty_spli
[all...]
H A Drelo_core.h10 const struct btf *btf; member in struct:bpf_core_cand
14 /* dynamically sized list of type IDs and its associated struct btf */
30 const struct btf *btf; member in struct:bpf_core_spec
71 int __bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id,
72 const struct btf *targ_btf, __u32 targ_id, int level);
73 int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id,
74 const struct btf *targ_btf, __u32 targ_id);
75 int __bpf_core_types_match(const struct btf *local_bt
[all...]
H A Dbtf.c17 #include <linux/btf.h>
19 #include "btf.h"
31 struct btf { struct
97 struct btf *base_btf;
192 static void *btf_add_type_offs_mem(struct btf *btf, size_t add_cnt) argument
194 return libbpf_add_mem((void **)&btf->type_offs, &btf->type_offs_cap, sizeof(__u32),
195 btf->nr_types, BTF_MAX_NR_TYPES, add_cnt);
198 static int btf_add_type_idx_entry(struct btf *bt argument
220 btf_parse_hdr(struct btf *btf) argument
269 btf_parse_str_sec(struct btf *btf) argument
413 btf_parse_type_sec(struct btf *btf) argument
451 btf_validate_str(const struct btf *btf, __u32 str_off, const char *what, __u32 type_id) argument
464 btf_validate_id(const struct btf *btf, __u32 id, __u32 ctx_id) argument
477 btf_validate_type(const struct btf *btf, const struct btf_type *t, __u32 id) argument
595 btf_sanity_check(const struct btf *btf) argument
610 btf__type_cnt(const struct btf *btf) argument
615 btf__base_btf(const struct btf *btf) argument
621 btf_type_by_id(const struct btf *btf, __u32 type_id) argument
630 btf__type_by_id(const struct btf *btf, __u32 type_id) argument
637 determine_ptr_size(const struct btf *btf) argument
681 btf_ptr_sz(const struct btf *btf) argument
696 btf__pointer_size(const struct btf *btf) argument
711 btf__set_pointer_size(struct btf *btf, size_t ptr_sz) argument
730 btf__endianness(const struct btf *btf) argument
738 btf__set_endianness(struct btf *btf, enum btf_endianness endian) argument
763 btf__resolve_size(const struct btf *btf, __u32 type_id) argument
818 btf__align_of(const struct btf *btf, __u32 id) argument
873 btf__resolve_type(const struct btf *btf, __u32 type_id) argument
893 btf__find_by_name(const struct btf *btf, const char *type_name) argument
911 btf_find_by_name_kind(const struct btf *btf, int start_id, const char *type_name, __u32 kind) argument
933 btf__find_by_name_kind_own(const struct btf *btf, const char *type_name, __u32 kind) argument
939 btf__find_by_name_kind(const struct btf *btf, const char *type_name, __u32 kind) argument
945 btf_is_modifiable(const struct btf *btf) argument
950 btf__free(struct btf *btf) argument
977 struct btf *btf; local
1028 struct btf *btf; local
1092 struct btf *btf = NULL; local
1225 struct btf *btf = NULL; local
1298 struct btf *btf; local
1325 btf_load_into_kernel(struct btf *btf, char *log_buf, size_t log_sz, __u32 log_level, int token_fd) argument
1406 btf__load_into_kernel(struct btf *btf) argument
1411 btf__fd(const struct btf *btf) argument
1416 btf__set_fd(struct btf *btf, int fd) argument
1421 btf_strs_data(const struct btf *btf) argument
1426 btf_get_raw_data(const struct btf *btf, __u32 *size, bool swap_endian) argument
1478 struct btf *btf = (struct btf *)btf_ro; local
1498 btf__str_by_offset(const struct btf *btf, __u32 offset) argument
1508 btf__name_by_offset(const struct btf *btf, __u32 offset) argument
1518 struct btf *btf; local
1569 struct btf *btf; local
1587 btf_invalidate_raw_data(struct btf *btf) argument
1603 btf_ensure_modifiable(struct btf *btf) argument
1663 btf__find_str(struct btf *btf, const char *s) argument
1689 btf__add_str(struct btf *btf, const char *s) argument
1711 btf_add_type_mem(struct btf *btf, size_t add_sz) argument
1722 btf_commit_type(struct btf *btf, int data_sz) argument
1774 btf__add_type(struct btf *btf, const struct btf *src_btf, const struct btf_type *src_type) argument
1803 struct btf *btf = ctx; local
1819 btf__add_btf(struct btf *btf, const struct btf *src_btf) argument
1928 btf__add_int(struct btf *btf, const char *name, size_t byte_sz, int encoding) argument
1976 btf__add_float(struct btf *btf, const char *name, size_t byte_sz) argument
2021 btf_add_ref_kind(struct btf *btf, int kind, const char *name, int ref_type_id) argument
2057 btf__add_ptr(struct btf *btf, int ref_type_id) argument
2071 btf__add_array(struct btf *btf, int index_type_id, int elem_type_id, __u32 nr_elems) argument
2101 btf_add_composite(struct btf *btf, int kind, const char *name, __u32 bytes_sz) argument
2142 btf__add_struct(struct btf *btf, const char *name, __u32 byte_sz) argument
2160 btf__add_union(struct btf *btf, const char *name, __u32 byte_sz) argument
2165 btf_last_type(struct btf *btf) argument
2180 btf__add_field(struct btf *btf, const char *name, int type_id, __u32 bit_offset, __u32 bit_size) argument
2235 btf_add_enum_common(struct btf *btf, const char *name, __u32 byte_sz, bool is_signed, __u8 kind) argument
2280 btf__add_enum(struct btf *btf, const char *name, __u32 byte_sz) argument
2297 btf__add_enum_value(struct btf *btf, const char *name, __s64 value) argument
2359 btf__add_enum64(struct btf *btf, const char *name, __u32 byte_sz, bool is_signed) argument
2374 btf__add_enum64_value(struct btf *btf, const char *name, __u64 value) argument
2426 btf__add_fwd(struct btf *btf, const char *name, enum btf_fwd_kind fwd_kind) argument
2462 btf__add_typedef(struct btf *btf, const char *name, int ref_type_id) argument
2477 btf__add_volatile(struct btf *btf, int ref_type_id) argument
2489 btf__add_const(struct btf *btf, int ref_type_id) argument
2501 btf__add_restrict(struct btf *btf, int ref_type_id) argument
2514 btf__add_type_tag(struct btf *btf, const char *value, int ref_type_id) argument
2530 btf__add_func(struct btf *btf, const char *name, enum btf_func_linkage linkage, int proto_type_id) argument
2562 btf__add_func_proto(struct btf *btf, int ret_type_id) argument
2596 btf__add_func_param(struct btf *btf, const char *name, int type_id) argument
2649 btf__add_var(struct btf *btf, const char *name, int linkage, int type_id) argument
2699 btf__add_datasec(struct btf *btf, const char *name, __u32 byte_sz) argument
2738 btf__add_datasec_var_info(struct btf *btf, int var_type_id, __u32 offset, __u32 byte_sz) argument
2786 btf__add_decl_tag(struct btf *btf, const char *value, int ref_type_id, int component_idx) argument
3214 btf__dedup(struct btf *btf, const struct btf_dedup_opts *opts) argument
3284 struct btf *btf; member in struct:btf_dedup
3390 btf_dedup_new(struct btf *btf, const struct btf_dedup_opts *opts) argument
4957 struct btf *btf; local
[all...]
H A Dlibbpf_legacy.h125 struct btf;
128 LIBBPF_API struct btf *libbpf_find_kernel_btf(void);
133 LIBBPF_API const void *btf__get_raw_data(const struct btf *btf, __u32 *size);
/linux-master/include/linux/
H A Dbtf.h11 #include <uapi/linux/btf.h>
107 struct btf;
140 const char *btf_get_name(const struct btf *btf);
141 void btf_get(struct btf *btf);
142 void btf_put(struct btf *btf);
144 struct btf *btf_get_by_fd(int fd);
145 int btf_get_info_by_fd(const struct btf *bt
512 bpf_struct_ops_find(struct btf *btf, u32 type_id) argument
541 btf_type_by_id(const struct btf *btf, u32 type_id) argument
546 btf_name_by_offset(const struct btf *btf, u32 offset) argument
551 btf_kfunc_id_set_contains(const struct btf *btf, u32 kfunc_btf_id, struct bpf_prog *prog) argument
563 btf_find_dtor_kfunc(struct btf *btf, u32 btf_id) argument
572 btf_find_struct_meta(const struct btf *btf, u32 btf_id) argument
577 btf_is_prog_ctx_type(struct bpf_verifier_log *log, const struct btf *btf, const struct btf_type *t, enum bpf_prog_type prog_type, int arg) argument
594 btf_type_is_struct_ptr(struct btf *btf, const struct btf_type *t) argument
[all...]
/linux-master/kernel/bpf/
H A Dbtf.c4 #include <uapi/linux/btf.h>
20 #include <linux/btf.h>
116 * an array: "btf->types".
137 * 1) does exist in the BTF (i.e. in btf->types[])
251 struct btf { struct
271 struct btf *base_btf;
311 struct btf *btf; member in struct:btf_verifier_env
417 const struct btf *btf; member in struct:btf_show
532 btf_nr_types(const struct btf *btf) argument
544 btf_find_by_name_kind(const struct btf *btf, const char *name, u8 kind) argument
566 struct btf *btf; local
608 btf_type_skip_modifiers(const struct btf *btf, u32 id, u32 *res_id) argument
624 btf_type_resolve_ptr(const struct btf *btf, u32 id, u32 *res_id) argument
636 btf_type_resolve_func_ptr(const struct btf *btf, u32 id, u32 *res_id) argument
752 btf_name_offset_valid(const struct btf *btf, u32 offset) argument
774 btf_str_by_offset(const struct btf *btf, u32 offset) argument
786 __btf_name_valid(const struct btf *btf, u32 offset) argument
807 btf_name_valid_identifier(const struct btf *btf, u32 offset) argument
813 btf_name_valid_section(const struct btf *btf, u32 offset) argument
831 __btf_name_by_offset(const struct btf *btf, u32 offset) argument
842 btf_name_by_offset(const struct btf *btf, u32 offset) argument
847 btf_type_by_id(const struct btf *btf, u32 type_id) argument
886 btf_member_is_reg_int(const struct btf *btf, const struct btf_type *s, const struct btf_member *m, u32 expected_offset, u32 expected_size) argument
924 btf_type_skip_qualifiers(const struct btf *btf, u32 id) argument
1436 struct btf *btf = env->btf; local
1486 struct btf *btf = env->btf; local
1564 const struct btf *btf = env->btf; local
1586 struct btf *btf = env->btf; local
1629 btf_alloc_id(struct btf *btf) argument
1647 btf_free_id(struct btf *btf) argument
1665 btf_free_kfunc_set_tab(struct btf *btf) argument
1684 btf_free_dtor_kfunc_tab(struct btf *btf) argument
1705 btf_free_struct_meta_tab(struct btf *btf) argument
1713 btf_free_struct_ops_tab(struct btf *btf) argument
1728 btf_free(struct btf *btf) argument
1743 struct btf *btf = container_of(rcu, struct btf, rcu); local
1748 btf_get_name(const struct btf *btf) argument
1753 btf_get(struct btf *btf) argument
1758 btf_put(struct btf *btf) argument
1768 struct btf *btf = env->btf; local
1846 const struct btf *btf = env->btf; local
1884 struct btf *btf = env->btf; local
1918 __btf_resolve_size(const struct btf *btf, const struct btf_type *type, u32 *type_size, const struct btf_type **elem_type, u32 *elem_id, u32 *total_nelems, u32 *type_id) argument
1988 btf_resolve_size(const struct btf *btf, const struct btf_type *type, u32 *type_size) argument
1994 btf_resolved_type_id(const struct btf *btf, u32 type_id) argument
2003 btf_type_id_resolve(const struct btf *btf, u32 *type_id) argument
2010 btf_resolved_type_size(const struct btf *btf, u32 type_id) argument
2018 btf_type_id_size(const struct btf *btf, u32 *type_id, u32 *ret_size) argument
2110 btf_df_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offsets, struct btf_show *show) argument
2378 btf_int_bits_show(const struct btf *btf, const struct btf_type *t, void *data, u8 bits_offset, struct btf_show *show) argument
2397 btf_int_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
2484 struct btf *btf = env->btf; local
2509 struct btf *btf = env->btf; local
2606 struct btf *btf = env->btf; local
2648 struct btf *btf = env->btf; local
2694 struct btf *btf = env->btf; local
2745 btf_modifier_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
2758 btf_var_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
2767 btf_ptr_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
2858 struct btf *btf = env->btf; local
2938 struct btf *btf = env->btf; local
3006 __btf_array_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
3059 btf_array_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
3133 struct btf *btf = env->btf; local
3303 btf_find_struct(const struct btf *btf, const struct btf_type *t, u32 off, int sz, enum btf_field_type field_type, struct btf_field_info *info) argument
3316 btf_find_kptr(const struct btf *btf, const struct btf_type *t, u32 off, int sz, struct btf_field_info *info) argument
3356 btf_find_next_decl_tag(const struct btf *btf, const struct btf_type *pt, int comp_idx, const char *tag_key, int last_id) argument
3378 btf_find_decl_tag_value(const struct btf *btf, const struct btf_type *pt, int comp_idx, const char *tag_key) argument
3402 btf_find_graph_root(const struct btf *btf, const struct btf_type *pt, const struct btf_type *t, int comp_idx, u32 off, int sz, struct btf_field_info *info, enum btf_field_type head_type) argument
3487 btf_find_struct_field(const struct btf *btf, const struct btf_type *t, u32 field_mask, struct btf_field_info *info, int info_cnt) argument
3556 btf_find_datasec_var(const struct btf *btf, const struct btf_type *t, u32 field_mask, struct btf_field_info *info, int info_cnt) argument
3623 btf_find_field(const struct btf *btf, const struct btf_type *t, u32 field_mask, struct btf_field_info *info, int info_cnt) argument
3634 btf_parse_kptr(const struct btf *btf, struct btf_field *field, struct btf_field_info *info) argument
3725 btf_parse_graph_root(const struct btf *btf, struct btf_field *field, struct btf_field_info *info, const char *node_type_name, size_t node_type_align) argument
3769 btf_parse_list_head(const struct btf *btf, struct btf_field *field, struct btf_field_info *info) argument
3776 btf_parse_rb_root(const struct btf *btf, struct btf_field *field, struct btf_field_info *info) argument
3795 btf_parse_fields(const struct btf *btf, const struct btf_type *t, u32 field_mask, u32 value_size) argument
3904 btf_check_and_fixup_fields(const struct btf *btf, struct btf_record *rec) argument
3976 __btf_struct_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
4023 btf_struct_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
4131 struct btf *btf = env->btf; local
4191 btf_enum_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
4239 struct btf *btf = env->btf; local
4294 btf_enum64_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
4614 struct btf *btf = env->btf; local
4656 btf_datasec_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct btf_show *show) argument
4813 struct btf *btf = env->btf; local
4873 const struct btf *btf; local
4968 const struct btf *btf; local
5057 struct btf *btf = env->btf; local
5086 struct btf *btf = env->btf; local
5158 struct btf *btf = env->btf; local
5216 struct btf *btf = env->btf; local
5263 const struct btf *btf; local
5314 struct btf *btf; local
5384 btf_parse_struct_metas(struct bpf_verifier_log *log, struct btf *btf) argument
5469 btf_find_struct_meta(const struct btf *btf, u32 btf_id) argument
5480 btf_check_type_tags(struct btf_verifier_env *env, struct btf *btf, int start_id) argument
5548 struct btf *btf = NULL; local
5711 btf_is_prog_ctx_type(struct bpf_verifier_log *log, const struct btf *btf, const struct btf_type *t, enum bpf_prog_type prog_type, int arg) argument
5799 btf_validate_prog_ctx_type(struct bpf_verifier_log *log, const struct btf *btf, const struct btf_type *t, int arg, enum bpf_prog_type prog_type, enum bpf_attach_type attach_type) argument
5933 btf_translate_to_vmlinux(struct bpf_verifier_log *log, struct btf *btf, const struct btf_type *t, enum bpf_prog_type prog_type, int arg) argument
5971 struct btf *btf = NULL; local
6038 struct btf *btf = NULL, *base_btf; local
6119 is_int_ptr(struct btf *btf, const struct btf_type *t) argument
6127 get_ctx_arg_idx(struct btf *btf, const struct btf_type *func_proto, int off) argument
6171 btf_ctx_arg_offset(const struct btf *btf, const struct btf_type *func_proto, u32 arg_no) argument
6197 struct btf *btf = bpf_prog_get_target_btf(prog); local
6392 btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf, const struct btf_type *t, int off, int size, u32 *next_btf_id, enum bpf_type_flag *flag, const char **field_name) argument
6657 const struct btf *btf = reg->btf; local
6740 btf_struct_ids_match(struct bpf_verifier_log *log, const struct btf *btf, u32 id, int off, const struct btf *need_btf, u32 need_type_id, bool strict) argument
6779 __get_type_size(struct btf *btf, u32 btf_id, const struct btf_type **ret_type) argument
6814 btf_distill_func_proto(struct bpf_verifier_log *log, struct btf *btf, const struct btf_type *func, const char *tname, struct btf_func_model *m) argument
7027 btf_is_dynptr_ptr(const struct btf *btf, const struct btf_type *t) argument
7052 const struct btf *btf; member in struct:bpf_cand_cache::__anon2852
7062 btf_get_ptr_to_btf_id(struct bpf_verifier_log *log, int arg_idx, const struct btf *btf, const struct btf_type *t) argument
7136 struct btf *btf = prog->aux->btf; local
7340 btf_type_show(const struct btf *btf, u32 type_id, void *obj, struct btf_show *show) argument
7358 btf_type_seq_show_flags(const struct btf *btf, u32 type_id, void *obj, struct seq_file *m, u64 flags) argument
7372 btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj, struct seq_file *m) argument
7408 btf_type_snprintf_show(const struct btf *btf, u32 type_id, void *obj, char *buf, int len, u64 flags) argument
7432 const struct btf *btf = filp->private_data; local
7451 __btf_new_fd(struct btf *btf) argument
7458 struct btf *btf; local
7486 struct btf *btf; local
7506 btf_get_info_by_fd(const struct btf *btf, const union bpf_attr *attr, union bpf_attr __user *uattr) argument
7568 struct btf *btf; local
7587 btf_obj_id(const struct btf *btf) argument
7592 btf_is_kernel(const struct btf *btf) argument
7597 btf_is_module(const struct btf *btf) argument
7610 struct btf *btf; member in struct:btf_module
7623 const struct btf *btf = bin_attr->private; local
7636 struct btf *btf; local
7750 btf_try_get_module(const struct btf *btf) argument
7785 struct btf *btf = NULL; local
7823 struct btf *btf = NULL; local
7862 btf_check_iter_kfuncs(struct btf *btf, const char *func_name, const struct btf_type *func, u32 func_flags) argument
7935 btf_check_kfunc_protos(struct btf *btf, u32 func_id, u32 func_flags) argument
7966 btf_populate_kfunc_set(struct btf *btf, enum btf_kfunc_hook hook, const struct btf_kfunc_id_set *kset) argument
8080 __btf_kfunc_id_set_contains(const struct btf *btf, enum btf_kfunc_hook hook, u32 kfunc_btf_id, const struct bpf_prog *prog) argument
8152 btf_kfunc_id_set_contains(const struct btf *btf, u32 kfunc_btf_id, const struct bpf_prog *prog) argument
8168 btf_kfunc_is_modify_return(const struct btf *btf, u32 kfunc_btf_id, const struct bpf_prog *prog) argument
8177 struct btf *btf; local
8226 btf_find_dtor_kfunc(struct btf *btf, u32 btf_id) argument
8243 btf_check_dtor_kfuncs(struct btf *btf, const struct btf_id_dtor_kfunc *dtors, u32 cnt) argument
8285 struct btf *btf; local
8509 __purge_cand_cache(struct btf *btf, struct bpf_cand_cache **cache, int cache_size) argument
8541 purge_cand_cache(struct btf *btf) argument
8759 struct btf *btf = reg->btf; local
8859 btf_add_struct_ops(struct btf *btf, struct bpf_struct_ops *st_ops, struct bpf_verifier_log *log) argument
8903 bpf_struct_ops_find_value(struct btf *btf, u32 value_id) argument
8925 bpf_struct_ops_find(struct btf *btf, u32 type_id) argument
8949 struct btf *btf; local
8977 btf_param_match_suffix(const struct btf *btf, const struct btf_param *arg, const char *suffix) argument
[all...]
H A Dbpf_struct_ops.c6 #include <linux/btf.h>
40 /* The owner moduler's btf. */
41 struct btf *btf; member in struct:bpf_struct_ops_map
84 extern struct btf *btf_vmlinux;
86 static bool is_valid_value_type(struct btf *btf, s32 value_id, argument
94 vt = btf_type_by_id(btf, value_id);
101 mt = btf_type_by_id(btf, member->type);
110 mt = btf_type_by_id(btf, membe
156 find_stub_func_proto(const struct btf *btf, const char *st_op_name, const char *member_name) argument
200 prepare_arg_info(struct btf *btf, const char *st_ops_name, const char *member_name, const struct btf_type *func_proto, struct bpf_struct_ops_arg_info *arg_info) argument
310 bpf_struct_ops_desc_init(struct bpf_struct_ops_desc *st_ops_desc, struct btf *btf, struct bpf_verifier_log *log) argument
499 check_zero_holes(const struct btf *btf, const struct btf_type *t, void *data) argument
902 struct btf *btf; local
[all...]
/linux-master/kernel/bpf/preload/iterators/
H A Diterators.bpf.c34 struct btf { struct
46 struct btf *btf; member in struct:bpf_prog_aux
59 static const char *get_name(struct btf *btf, long btf_id, const char *fallback) argument
65 if (!btf)
67 str = btf->strings;
68 types = btf->types;
71 if (name_off >= btf->hdr.str_len)
114 get_name(aux->btf, au
[all...]
/linux-master/tools/testing/selftests/bpf/bpf_test_no_cfi/
H A Dbpf_test_no_cfi.c4 #include <linux/btf.h>
13 static int dummy_init(struct btf *btf) argument

Completed in 262 milliseconds

1234567