/kernel/bpf/ |
D | btf.c | 201 struct btf { struct 217 struct btf *base_btf; argument 257 struct btf *btf; member 354 const struct btf *btf; member 393 void (*show)(const struct btf *btf, const struct btf_type *t, 463 u32 btf_nr_types(const struct btf *btf) in btf_nr_types() argument 467 while (btf) { in btf_nr_types() 468 total += btf->nr_types; in btf_nr_types() 469 btf = btf->base_btf; in btf_nr_types() 475 s32 btf_find_by_name_kind(const struct btf *btf, const char *name, u8 kind) in btf_find_by_name_kind() argument [all …]
|
D | bpf_struct_ops.c | 100 void bpf_struct_ops_init(struct btf *btf, struct bpf_verifier_log *log) in bpf_struct_ops_init() argument 115 module_id = btf_find_by_name_kind(btf, "module", BTF_KIND_STRUCT); in bpf_struct_ops_init() 120 module_type = btf_type_by_id(btf, module_id); in bpf_struct_ops_init() 133 value_id = btf_find_by_name_kind(btf, value_name, in bpf_struct_ops_init() 141 type_id = btf_find_by_name_kind(btf, st_ops->name, in bpf_struct_ops_init() 148 t = btf_type_by_id(btf, type_id); in bpf_struct_ops_init() 158 mname = btf_name_by_offset(btf, member->name_off); in bpf_struct_ops_init() 171 func_proto = btf_type_resolve_func_ptr(btf, in bpf_struct_ops_init() 175 btf_distill_func_proto(log, btf, in bpf_struct_ops_init() 185 if (st_ops->init(btf)) { in bpf_struct_ops_init() [all …]
|
D | map_in_map.c | 55 if (inner_map->btf) { in bpf_map_meta_alloc() 56 btf_get(inner_map->btf); in bpf_map_meta_alloc() 57 inner_map_meta->btf = inner_map->btf; in bpf_map_meta_alloc() 74 btf_put(map_meta->btf); in bpf_map_meta_free()
|
D | local_storage.c | 358 const struct btf *btf, in cgroup_storage_check_btf() argument 386 if (!btf_member_is_reg_int(btf, key_type, m, 0, size)) in cgroup_storage_check_btf() 395 if (!btf_member_is_reg_int(btf, key_type, m, offset, size)) in cgroup_storage_check_btf() 429 btf_type_seq_show(map->btf, map->btf_key_type_id, key, m); in cgroup_storage_seq_show_elem() 433 btf_type_seq_show(map->btf, map->btf_value_type_id, in cgroup_storage_seq_show_elem() 440 btf_type_seq_show(map->btf, map->btf_value_type_id, in cgroup_storage_seq_show_elem()
|
D | verifier.c | 254 struct btf *btf; member 256 struct btf *ret_btf; 261 struct btf *btf_vmlinux; 395 ltrim(btf_name_by_offset(env->prog->aux->btf, in verbose_linfo() 610 static const char *kernel_type_name(const struct btf* btf, u32 id) in kernel_type_name() argument 612 return btf_name_by_offset(btf, btf_type_by_id(btf, id)->name_off); in kernel_type_name() 655 verbose(env, "%s", kernel_type_name(reg->btf, reg->btf_id)); in print_verifier_state() 1491 struct btf *btf, u32 btf_id) in mark_btf_ld_reg() argument 1499 regs[regno].btf = btf; in mark_btf_ld_reg() 3596 struct btf **btf, u32 *btf_id) in check_ctx_access() argument [all …]
|
D | syscall.c | 500 btf_put(map->btf); in __bpf_map_put() 760 const struct btf *btf, in map_check_no_btf() argument 767 static int map_check_btf(struct bpf_map *map, const struct btf *btf, in map_check_btf() argument 776 key_type = btf_type_id_size(btf, &btf_key_id, &key_size); in map_check_btf() 780 key_type = btf_type_by_id(btf, 0); in map_check_btf() 785 value_type = btf_type_id_size(btf, &btf_value_id, &value_size); in map_check_btf() 789 map->spin_lock_off = btf_find_spin_lock(btf, value_type); in map_check_btf() 810 map->timer_off = btf_find_timer(btf, value_type); in map_check_btf() 821 ret = map->ops->map_check_btf(map, btf, key_type, value_type); in map_check_btf() 880 struct btf *btf; in map_create() local [all …]
|
D | arraymap.c | 426 btf_type_seq_show(map->btf, map->btf_value_type_id, value, m); in array_map_seq_show_elem() 446 btf_type_seq_show(map->btf, map->btf_value_type_id, in percpu_array_map_seq_show_elem() 456 const struct btf *btf, in array_map_check_btf() argument 895 btf_type_seq_show(map->btf, map->btf_value_type_id, in prog_array_map_seq_show_elem()
|
D | Makefile | 16 obj-$(CONFIG_BPF_SYSCALL) += btf.o
|
D | bpf_local_storage.c | 603 const struct btf *btf, in bpf_local_storage_map_check_btf() argument
|
D | lpm_trie.c | 716 const struct btf *btf, in trie_check_btf() argument
|
D | hashtab.c | 1493 btf_type_seq_show(map->btf, map->btf_key_type_id, key, m); in htab_map_seq_show_elem() 1495 btf_type_seq_show(map->btf, map->btf_value_type_id, value, m); in htab_map_seq_show_elem() 2258 btf_type_seq_show(map->btf, map->btf_key_type_id, key, m); in htab_percpu_map_seq_show_elem() 2263 btf_type_seq_show(map->btf, map->btf_value_type_id, in htab_percpu_map_seq_show_elem()
|
D | core.c | 575 type = btf_type_by_id(prog->aux->btf, in bpf_prog_ksym_set_name() 577 func_name = btf_name_by_offset(prog->aux->btf, type->name_off); in bpf_prog_ksym_set_name() 2257 btf_put(btf_mod->btf); in __bpf_free_used_btfs()
|
/kernel/bpf/preload/iterators/ |
D | iterators.bpf.c | 34 struct btf { struct 46 struct btf *btf; argument 59 static const char *get_name(struct btf *btf, long btf_id, const char *fallback) in get_name() argument 65 if (!btf) in get_name() 67 str = btf->strings; in get_name() 68 types = btf->types; in get_name() 71 if (name_off >= btf->hdr.str_len) in get_name() 109 get_name(aux->btf, aux->func_info[0].type_id, aux->name), in dump_bpf_prog()
|
/kernel/trace/ |
D | bpf_trace.c | 78 u64 flags, const struct btf **btf, 473 const struct btf *btf; in BPF_CALL_4() local 477 ret = bpf_btf_printf_prepare(ptr, btf_ptr_size, flags, &btf, &btf_id); in BPF_CALL_4() 481 return btf_type_seq_show_flags(btf, btf_id, ptr->ptr, m, flags); in BPF_CALL_4() 929 u64 flags, const struct btf **btf, in bpf_btf_printf_prepare() argument 940 *btf = bpf_get_btf_vmlinux(); in bpf_btf_printf_prepare() 942 if (IS_ERR_OR_NULL(*btf)) in bpf_btf_printf_prepare() 943 return IS_ERR(*btf) ? PTR_ERR(*btf) : -EINVAL; in bpf_btf_printf_prepare() 951 t = btf_type_by_id(*btf, *btf_id); in bpf_btf_printf_prepare() 961 const struct btf *btf; in BPF_CALL_5() local [all …]
|