Home
last modified time | relevance | path

Searched refs:btf_type (Results 1 – 25 of 73) sorted by relevance

123

/linux-6.12.1/include/linux/
Dbtf.h109 struct btf_type;
170 const struct btf_type *btf_type_id_size(const struct btf *btf,
220 bool btf_member_is_reg_int(const struct btf *btf, const struct btf_type *s,
223 struct btf_record *btf_parse_fields(const struct btf *btf, const struct btf_type *t,
226 bool btf_type_is_void(const struct btf_type *t);
229 const struct btf_type *btf_type_skip_modifiers(const struct btf *btf,
231 const struct btf_type *btf_type_resolve_ptr(const struct btf *btf,
233 const struct btf_type *btf_type_resolve_func_ptr(const struct btf *btf,
235 const struct btf_type *
236 btf_resolve_size(const struct btf *btf, const struct btf_type *type,
[all …]
Dbpf_local_storage.h171 const struct btf_type *key_type,
172 const struct btf_type *value_type);
/linux-6.12.1/tools/lib/bpf/
Dbtf.h26 struct btf_type;
152 LIBBPF_API const struct btf_type *btf__type_by_id(const struct btf *btf,
174 const struct btf_type *src_type);
356 static inline __u16 btf_kind(const struct btf_type *t) in btf_kind()
361 static inline __u16 btf_vlen(const struct btf_type *t) in btf_vlen()
366 static inline bool btf_kflag(const struct btf_type *t) in btf_kflag()
371 static inline bool btf_is_void(const struct btf_type *t) in btf_is_void()
376 static inline bool btf_is_int(const struct btf_type *t) in btf_is_int()
381 static inline bool btf_is_ptr(const struct btf_type *t) in btf_is_ptr()
386 static inline bool btf_is_array(const struct btf_type *t) in btf_is_array()
[all …]
Dbtf_iter.c16 int btf_field_iter_init(struct btf_field_iter *it, struct btf_type *t, in btf_field_iter_init()
44 it->desc = (struct btf_field_desc) { 1, {offsetof(struct btf_type, type)} }; in btf_field_iter_init()
48 2, {sizeof(struct btf_type) + offsetof(struct btf_array, type), in btf_field_iter_init()
49 sizeof(struct btf_type) + offsetof(struct btf_array, index_type)} in btf_field_iter_init()
62 1, {offsetof(struct btf_type, type)}, in btf_field_iter_init()
98 1, {offsetof(struct btf_type, name_off)} in btf_field_iter_init()
103 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
110 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
118 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
125 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
[all …]
Dbtf_dump.c314 const struct btf_type *t; in btf_dump_mark_referenced()
483 const struct btf_type *t; in btf_dump_order_type()
617 const struct btf_type *t);
620 const struct btf_type *t);
622 const struct btf_type *t, int lvl);
625 const struct btf_type *t);
627 const struct btf_type *t, int lvl);
630 const struct btf_type *t);
633 const struct btf_type *t, int lvl);
654 const struct btf_type *t = btf__type_by_id(d->btf, id); in btf_dump_is_blacklisted()
[all …]
Dbtf.c29 static struct btf_type btf_void;
291 static int btf_type_size(const struct btf_type *t) in btf_type_size()
293 const int base_size = sizeof(struct btf_type); in btf_type_size()
332 static void btf_bswap_type_base(struct btf_type *t) in btf_bswap_type_base()
339 static int btf_bswap_type_rest(struct btf_type *t) in btf_bswap_type_rest()
423 while (next_type + sizeof(struct btf_type) <= end_type) { in btf_parse_type_sec()
469 const struct btf_type *t; in btf_validate_id()
480 static int btf_validate_type(const struct btf *btf, const struct btf_type *t, __u32 id) in btf_validate_type()
552 const struct btf_type *ft; in btf_validate_type()
600 const struct btf_type *t; in btf_sanity_check()
[all …]
Drelo_core.c11 static const char *btf_kind_str(const struct btf_type *t) in btf_kind_str()
21 static const struct btf_type *
34 const struct btf_type *t; in btf__resolve_size()
75 const struct btf_type *t; in is_flex_arr()
149 const struct btf_type *local_type, *targ_type; in __bpf_core_types_are_compat()
269 const struct btf_type *t; in bpf_core_parse_spec()
417 const struct btf_type *local_type, *targ_type; in bpf_core_fields_are_compat()
488 const struct btf_type *local_type, *targ_type; in bpf_core_match_member()
561 const struct btf_type *targ_type; in bpf_core_spec_match()
685 const struct btf_type *t; in bpf_core_calc_field_relo()
[all …]
Dbtf_relocate.c16 #define btf_type_by_id (struct btf_type *)btf_type_by_id
68 struct btf_type *t = btf_type_by_id(r->btf, i); in btf_relocate_rewrite_type_id()
134 struct btf_type *t = btf_type_by_id(r->btf, i); in btf_mark_embedded_composite_type_ids()
187 struct btf_type *base_t, *dist_t; in btf_relocate_map_distilled_base()
388 struct btf_type *t = btf_type_by_id(r->dist_base_btf, i); in btf_relocate_validate_distilled_base()
414 struct btf_type *t = btf_type_by_id(r->btf, i); in btf_relocate_rewrite_strs()
Dlibbpf_internal.h232 struct btf_type;
234 struct btf_type *btf_type_by_id(const struct btf *btf, __u32 type_id);
235 const char *btf_kind_str(const struct btf_type *t);
236 const struct btf_type *skip_mods_and_typedefs(const struct btf *btf, __u32 id, __u32 *res_id);
241 static inline enum btf_func_linkage btf_func_linkage(const struct btf_type *t) in btf_func_linkage()
282 const struct btf_type *def_t, bool strict,
536 int btf_field_iter_init(struct btf_field_iter *it, struct btf_type *t, enum btf_field_iter_kind ite…
/linux-6.12.1/tools/bpf/bpftool/
Dgen.c58 static const struct btf_type *
61 const struct btf_type *t; in resolve_func_ptr()
150 const struct btf_type *sec, in codegen_datasec_def()
167 const struct btf_type *var = btf__type_by_id(btf, sec_var->type); in codegen_datasec_def()
235 static const struct btf_type *find_type_for_map(struct btf *btf, const char *map_ident) in find_type_for_map()
241 const struct btf_type *t = btf__type_by_id(btf, i); in find_type_for_map()
280 const struct btf_type *sec; in codegen_datasecs()
319 const struct btf_type *v) in btf_is_ptr_to_func_proto()
329 const struct btf_type *sec, *var; in codegen_subskel_datasecs()
503 const struct btf_type *sec; in codegen_asserts()
[all …]
Dbtf_dumper.c28 const struct btf_type *func_proto,
29 const struct btf_type *func, int pos, int size);
32 const struct btf_type *func_proto, in dump_prog_id_as_func_ptr()
35 const struct btf_type *func_type; in dump_prog_id_as_func_ptr()
108 const struct btf_type *t, in btf_dumper_ptr()
112 const struct btf_type *ptr_type; in btf_dumper_ptr()
148 const struct btf_type *t, in btf_dumper_enum()
186 const struct btf_type *t, in btf_dumper_enum64()
214 const struct btf_type *elem_type; in is_str_array()
250 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_array()
[all …]
/linux-6.12.1/kernel/bpf/
Dbtf.c254 struct btf_type **types;
286 const struct btf_type *t;
346 const char *btf_type_str(const struct btf_type *t) in btf_type_str()
430 const struct btf_type *type;
444 const struct btf_type *t,
449 const struct btf_type *struct_type,
451 const struct btf_type *member_type);
453 const struct btf_type *struct_type,
455 const struct btf_type *member_type);
457 const struct btf_type *t);
[all …]
Dbpf_struct_ops.c89 const struct btf_type *type, in is_valid_value_type()
92 const struct btf_type *common_value_type; in is_valid_value_type()
94 const struct btf_type *vt, *mt; in is_valid_value_type()
157 static const struct btf_type *
162 const struct btf_type *func_type; in find_stub_func_proto()
205 const struct btf_type *func_proto, in prepare_arg_info()
208 const struct btf_type *stub_func_proto, *pointed_type; in prepare_arg_info()
319 const struct btf_type *t; in bpf_struct_ops_desc_init()
374 const struct btf_type *func_proto; in bpf_struct_ops_desc_init()
501 static int check_zero_holes(const struct btf *btf, const struct btf_type *t, void *data) in check_zero_holes()
[all …]
Dinode.c600 const struct btf_type *cmd_t;
601 const struct btf_type *map_t;
602 const struct btf_type *prog_t;
603 const struct btf_type *attach_t;
609 const struct btf_type *t; in find_bpffs_btf_enums()
650 static bool find_btf_enum_const(const struct btf *btf, const struct btf_type *enum_t, in find_btf_enum_const()
682 const struct btf_type *enum_t, in seq_print_delegate_opts()
880 const struct btf_type *enum_t; in bpf_parse_param()
/linux-6.12.1/kernel/trace/
Dtrace_btf.h4 const struct btf_type *btf_find_func_proto(const char *func_name,
6 const struct btf_param *btf_get_func_param(const struct btf_type *func_proto,
9 const struct btf_type *type,
Dtrace_btf.c13 const struct btf_type *btf_find_func_proto(const char *func_name, struct btf **btf_p) in btf_find_func_proto()
15 const struct btf_type *t; in btf_find_func_proto()
43 const struct btf_param *btf_get_func_param(const struct btf_type *func_proto, s32 *nr) in btf_get_func_param()
71 const struct btf_type *type, in btf_find_struct_member()
/linux-6.12.1/net/bpf/
Dbpf_dummy_struct_ops.c98 const struct btf_type *func_proto = prog->aux->attach_func_proto; in check_test_run_args()
103 const struct btf_type *t; in check_test_run_args()
133 const struct btf_type *func_proto; in bpf_struct_ops_test_run()
218 static int bpf_dummy_ops_check_member(const struct btf_type *t, in bpf_dummy_ops_check_member()
239 const struct btf_type *state; in bpf_dummy_ops_btf_struct_access()
240 const struct btf_type *t; in bpf_dummy_ops_btf_struct_access()
268 static int bpf_dummy_init_member(const struct btf_type *t, in bpf_dummy_init_member()
/linux-6.12.1/Documentation/bpf/
Dbtf.rst97 struct btf_type {
122 ``name_off`` in ``struct btf_type`` specifies the offset in the string table.
128 ``struct btf_type`` encoding requirement:
135 ``btf_type`` is followed by a ``u32`` with the following bits arrangement::
153 The ``btf_type.size * 8`` must be equal to or greater than ``BTF_INT_BITS()``
180 ``struct btf_type`` encoding requirement:
187 No additional type data follow ``btf_type``.
192 ``struct btf_type`` encoding requirement:
199 ``btf_type`` is followed by one ``struct btf_array``::
237 ``struct btf_type`` encoding requirement:
[all …]
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Dlibbpf_str.c24 const struct btf_type *t; in test_libbpf_bpf_attach_type_str()
69 const struct btf_type *t; in test_libbpf_bpf_link_type_str()
114 const struct btf_type *t; in test_libbpf_bpf_map_type_str()
171 const struct btf_type *t; in test_libbpf_bpf_prog_type_str()
Dlibbpf_probes.c10 const struct btf_type *t; in test_libbpf_probe_prog_types()
50 const struct btf_type *t; in test_libbpf_probe_map_types()
Dtest_global_funcs.c28 const struct btf_type *t; in check_ctx_arg_type()
93 const struct btf_type *fn_t, *proto_t; in subtest_ctx_arg_rewrite()
/linux-6.12.1/kernel/bpf/preload/iterators/
Diterators.bpf.c26 struct btf_type { struct
36 struct btf_type **types; argument
61 struct btf_type **types, *t; in get_name()
/linux-6.12.1/net/ipv4/
Dbpf_tcp_ca.c17 static const struct btf_type *tcp_sock_type;
19 static const struct btf_type *tcp_congestion_ops_type;
65 const struct btf_type *t; in bpf_tcp_ca_btf_struct_access()
141 const struct btf_type *t; in prog_ops_moff()
210 static int bpf_tcp_ca_init_member(const struct btf_type *t, in bpf_tcp_ca_init_member()
/linux-6.12.1/drivers/hid/bpf/
Dhid_bpf_struct_ops.c39 static int hid_bpf_ops_check_member(const struct btf_type *t, in hid_bpf_ops_check_member()
84 const struct btf_type *state = NULL; in hid_bpf_ops_btf_struct_access()
85 const struct btf_type *t; in hid_bpf_ops_btf_struct_access()
149 static int hid_bpf_ops_init_member(const struct btf_type *t, in hid_bpf_ops_init_member()
/linux-6.12.1/tools/sched_ext/include/scx/
Dcompat.h27 const struct btf_type *t; in __COMPAT_read_enum()
83 const struct btf_type *t; in __COMPAT_struct_has_field()

123