/linux/tools/lib/bpf/ |
H A D | relo_core.h | 71 int __bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id, 73 int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id, 75 int __bpf_core_types_match(const struct btf *local_btf, __u32 local_id, const struct btf *targ_btf, 77 int bpf_core_types_match(const struct btf *local_btf, __u32 local_id, const struct btf *targ_btf, 84 const struct btf *local_btf,
|
H A D | relo_core.c | 153 local_type = btf_type_by_id(local_btf, local_id); in __bpf_core_types_are_compat() 206 skip_mods_and_typedefs(local_btf, local_p->type, &local_id); in __bpf_core_types_are_compat() 440 local_name = btf__name_by_offset(local_btf, in bpf_core_fields_are_compat() 481 static int bpf_core_match_member(const struct btf *local_btf, in bpf_core_match_member() argument 501 local_type = btf_type_by_id(local_btf, local_id); in bpf_core_match_member() 523 found = bpf_core_match_member(local_btf, local_acc, in bpf_core_match_member() 538 found = bpf_core_fields_are_compat(local_btf, in bpf_core_match_member() 1283 const struct btf *local_btf, in bpf_core_calc_relo_insn() argument 1299 local_type = btf_type_by_id(local_btf, local_id); in bpf_core_calc_relo_insn() 1428 local_n = btf__name_by_offset(local_btf, local_name_off); in bpf_core_names_match() [all …]
|
H A D | libbpf.c | 5684 local_cand.btf = local_btf; in bpf_core_find_cands() 5686 local_t = btf__type_by_id(local_btf, local_type_id); in bpf_core_find_cands() 5690 local_name = btf__name_by_offset(local_btf, local_t->name_off); in bpf_core_find_cands() 5753 int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id, in bpf_core_types_are_compat() argument 5756 return __bpf_core_types_are_compat(local_btf, local_id, targ_btf, targ_id, 32); in bpf_core_types_are_compat() 5759 int bpf_core_types_match(const struct btf *local_btf, __u32 local_id, in bpf_core_types_match() argument 5762 return __bpf_core_types_match(local_btf, local_id, targ_btf, targ_id, false, 32); in bpf_core_types_match() 5812 const struct btf *local_btf, in bpf_core_resolve_relo() argument 5824 local_type = btf__type_by_id(local_btf, local_id); in bpf_core_resolve_relo() 5828 local_name = btf__name_by_offset(local_btf, local_type->name_off); in bpf_core_resolve_relo() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | core_reloc.c | 427 struct btf *local_btf = btf__parse(test->bpf_obj_file, NULL); in setup_type_id_case_local() local 434 btf__free(local_btf); in setup_type_id_case_local() 446 for (i = 1; i < btf__type_cnt(local_btf); i++) in setup_type_id_case_local() 448 t = btf__type_by_id(local_btf, i); in setup_type_id_case_local() 458 (name = btf__name_by_offset(local_btf, btf_members(t)[0].name_off)) && in setup_type_id_case_local() 462 (name = btf__name_by_offset(local_btf, btf_enum(t)[0].name_off)) && in setup_type_id_case_local() 465 } else if (btf_is_ptr(t) && (t = btf__type_by_id(local_btf, t->type))) { in setup_type_id_case_local() 484 exp->local_union = find_btf_type(local_btf, "a_union", BTF_KIND_UNION); in setup_type_id_case_local() 485 exp->local_enum = find_btf_type(local_btf, "an_enum", BTF_KIND_ENUM); in setup_type_id_case_local() 486 exp->local_int = find_btf_type(local_btf, "int", BTF_KIND_INT); in setup_type_id_case_local() [all …]
|
/linux/tools/bpf/bpftool/ |
H A D | gen.c | 2302 btfgen_find_cands(const struct btf *local_btf, const struct btf *targ_btf, __u32 local_id) in btfgen_find_cands() argument 2311 local_cand.btf = local_btf; in btfgen_find_cands() 2314 local_type = btf__type_by_id(local_btf, local_id); in btfgen_find_cands() 2320 local_name = btf__name_by_offset(local_btf, local_type->name_off); in btfgen_find_cands()
|
/linux/kernel/bpf/ |
H A D | btf.c | 8633 int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id, in bpf_core_types_are_compat() argument 8636 return __bpf_core_types_are_compat(local_btf, local_id, targ_btf, targ_id, in bpf_core_types_are_compat() 8642 int bpf_core_types_match(const struct btf *local_btf, u32 local_id, in bpf_core_types_match() argument 8645 return __bpf_core_types_match(local_btf, local_id, targ_btf, targ_id, false, in bpf_core_types_match() 8865 const struct btf *local_btf = ctx->btf; in bpf_core_find_cands() local 8879 local_type = btf_type_by_id(local_btf, local_type_id); in bpf_core_find_cands() 8883 name = btf_name_by_offset(local_btf, local_type->name_off); in bpf_core_find_cands()
|