Home
last modified time | relevance | path

Searched refs:btf1 (Results 1 - 7 of 7) sorted by relevance

/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/
H A Dbtf_dedup_split.c9 struct btf *btf1, *btf2; in test_split_simple() local
12 btf1 = btf__new_empty(); in test_split_simple()
13 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_simple()
16 btf__set_pointer_size(btf1, 8); /* enforce 64-bit arch */ in test_split_simple()
18 btf__add_int(btf1, "int", 4, BTF_INT_SIGNED); /* [1] int */ in test_split_simple()
19 btf__add_ptr(btf1, 1); /* [2] ptr to int */ in test_split_simple()
20 btf__add_struct(btf1, "s1", 4); /* [3] struct s1 { */ in test_split_simple()
21 btf__add_field(btf1, "f1", 1, 0, 0); /* int f1; */ in test_split_simple()
25 btf1, in test_split_simple()
31 ASSERT_STREQ(btf_type_c_dump(btf1), "\ in test_split_simple()
127 struct btf *btf1, *btf2; test_split_fwd_resolve() local
225 struct btf *btf1, *btf2; test_split_struct_duped() local
358 struct btf *btf1, *btf2 = NULL; test_split_dup_struct_in_cu() local
[all...]
H A Dbtf_split.c18 struct btf *btf1, *btf2; in test_btf_split() local
21 btf1 = btf__new_empty(); in test_btf_split()
22 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_btf_split()
25 btf__set_pointer_size(btf1, 8); /* enforce 64-bit arch */ in test_btf_split()
27 btf__add_int(btf1, "int", 4, BTF_INT_SIGNED); /* [1] int */ in test_btf_split()
28 btf__add_ptr(btf1, 1); /* [2] ptr to int */ in test_btf_split()
30 btf__add_struct(btf1, "s1", 4); /* [3] struct s1 { */ in test_btf_split()
31 btf__add_field(btf1, "f1", 1, 0, 0); /* int f1; */ in test_btf_split()
34 btf2 = btf__new_empty_split(btf1); in test_btf_split()
56 t = btf__type_by_id(btf1, in test_btf_split()
[all...]
H A Dbtf_write.c406 struct btf *btf1 = NULL, *btf2 = NULL; in test_btf_add_btf() local
409 btf1 = btf__new_empty(); in test_btf_add_btf()
410 if (!ASSERT_OK_PTR(btf1, "btf1")) in test_btf_add_btf()
417 gen_btf(btf1); in test_btf_add_btf()
420 id = btf__add_btf(btf1, btf2); in test_btf_add_btf()
425 btf1, in test_btf_add_btf()
496 btf__free(btf1); in test_btf_add_btf()
/kernel/linux/linux-6.6/include/linux/
H A Dbtf.h508 bool btf_types_are_same(const struct btf *btf1, u32 id1,
557 static inline bool btf_types_are_same(const struct btf *btf1, u32 id1, in btf_types_are_same() argument
/kernel/linux/linux-6.6/tools/lib/bpf/
H A Dlinker.c1299 const struct btf *btf1, __u32 id1, in glob_sym_btf_matches()
1309 t1 = skip_mods_and_typedefs(btf1, id1, &id1); in glob_sym_btf_matches()
1314 n1 = btf__str_by_offset(btf1, t1->name_off); in glob_sym_btf_matches()
1354 n1 = btf__str_by_offset(btf1, t1->name_off); in glob_sym_btf_matches()
1436 n1 = btf__str_by_offset(btf1, m1->name_off); in glob_sym_btf_matches()
1448 if (!glob_sym_btf_matches(sym_name, exact, btf1, m1->type, btf2, m2->type)) in glob_sym_btf_matches()
1468 if (!glob_sym_btf_matches(sym_name, exact, btf1, m1->type, btf2, m2->type)) in glob_sym_btf_matches()
1298 glob_sym_btf_matches(const char *sym_name, bool exact, const struct btf *btf1, __u32 id1, const struct btf *btf2, __u32 id2) glob_sym_btf_matches() argument
/kernel/linux/linux-5.10/kernel/bpf/
H A Dbtf.c5001 * t1 points to BTF_KIND_FUNC in btf1
5009 struct btf *btf1, const struct btf_type *t1, in btf_check_func_type_match()
5016 fn1 = btf_name_by_offset(btf1, t1->name_off); in btf_check_func_type_match()
5028 t1 = btf_type_by_id(btf1, t1->type); in btf_check_func_type_match()
5046 t1 = btf_type_skip_modifiers(btf1, t1->type, NULL); in btf_check_func_type_match()
5057 t1 = btf_type_skip_modifiers(btf1, args1[i].type, NULL); in btf_check_func_type_match()
5086 t1 = btf_type_skip_modifiers(btf1, t1->type, NULL); in btf_check_func_type_match()
5106 s1 = btf_name_by_offset(btf1, t1->name_off); in btf_check_func_type_match()
5122 struct btf *btf1 = prog->aux->btf; in btf_check_type_match() local
5135 t1 = btf_type_by_id(btf1, btf_i in btf_check_type_match()
5008 btf_check_func_type_match(struct bpf_verifier_log *log, struct btf *btf1, const struct btf_type *t1, struct btf *btf2, const struct btf_type *t2) btf_check_func_type_match() argument
[all...]
/kernel/linux/linux-6.6/kernel/bpf/
H A Dbtf.c6464 bool btf_types_are_same(const struct btf *btf1, u32 id1, in btf_types_are_same() argument
6469 if (btf1 == btf2) in btf_types_are_same()
6471 return btf_type_by_id(btf1, id1) == btf_type_by_id(btf2, id2); in btf_types_are_same()
6620 * t1 points to BTF_KIND_FUNC in btf1
6628 struct btf *btf1, const struct btf_type *t1, in btf_check_func_type_match()
6635 fn1 = btf_name_by_offset(btf1, t1->name_off); in btf_check_func_type_match()
6647 t1 = btf_type_by_id(btf1, t1->type); in btf_check_func_type_match()
6665 t1 = btf_type_skip_modifiers(btf1, t1->type, NULL); in btf_check_func_type_match()
6676 t1 = btf_type_skip_modifiers(btf1, args1[i].type, NULL); in btf_check_func_type_match()
6705 t1 = btf_type_skip_modifiers(btf1, t in btf_check_func_type_match()
6627 btf_check_func_type_match(struct bpf_verifier_log *log, struct btf *btf1, const struct btf_type *t1, struct btf *btf2, const struct btf_type *t2) btf_check_func_type_match() argument
6741 struct btf *btf1 = prog->aux->btf; btf_check_type_match() local
[all...]

Completed in 22 milliseconds