Home
last modified time | relevance | path

Searched refs:name_off (Results 1 – 25 of 61) sorted by relevance

123

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbtf_write.c32 ASSERT_EQ(t->name_off, str_off, "int_name_off"); in gen_btf()
33 ASSERT_STREQ(btf__str_by_offset(btf, t->name_off), "int", "int_name"); in gen_btf()
109 ASSERT_STREQ(btf__str_by_offset(btf, t->name_off), "s1", "struct_name"); in gen_btf()
115 ASSERT_STREQ(btf__str_by_offset(btf, m->name_off), "f1", "f1_name"); in gen_btf()
120 ASSERT_STREQ(btf__str_by_offset(btf, m->name_off), "f2", "f2_name"); in gen_btf()
141 ASSERT_STREQ(btf__str_by_offset(btf, t->name_off), "u1", "union_name"); in gen_btf()
147 ASSERT_STREQ(btf__str_by_offset(btf, m->name_off), "f1", "f1_name"); in gen_btf()
164 ASSERT_STREQ(btf__str_by_offset(btf, t->name_off), "e1", "enum_name"); in gen_btf()
169 ASSERT_STREQ(btf__str_by_offset(btf, v->name_off), "v1", "v1_name"); in gen_btf()
172 ASSERT_STREQ(btf__str_by_offset(btf, v->name_off), "v2", "v2_name"); in gen_btf()
[all …]
H A Dlibbpf_str.c48 attach_type_name = btf__str_by_offset(btf, e->name_off); in test_libbpf_bpf_attach_type_str()
93 link_type_name = btf__str_by_offset(btf, e->name_off); in test_libbpf_bpf_link_type_str()
138 map_type_name = btf__str_by_offset(btf, e->name_off); in test_libbpf_bpf_map_type_str()
195 prog_type_name = btf__str_by_offset(btf, e->name_off); in test_libbpf_bpf_prog_type_str()
H A Dbtf_dump.c583 {.name_off = (__u32)3,.val = (__s32)-1,}); in test_btf_dump_struct_data()
587 { .name_off = 3, .val = -1,}); in test_btf_dump_struct_data()
593 { .name_off = 3, .val = -1,}); in test_btf_dump_struct_data()
597 { .name_off = 0, .val = -1,}); in test_btf_dump_struct_data()
601 { .name_off = 0, .val = -1,}); in test_btf_dump_struct_data()
605 { .name_off = 0, .val = 0,}); in test_btf_dump_struct_data()
609 { .name_off = 0, .val = 0,}); in test_btf_dump_struct_data()
613 { .name_off = 0, .val = 0,}); in test_btf_dump_struct_data()
617 { .name_off = 0, .val = 0,}); in test_btf_dump_struct_data()
624 { .name_off = 0, .val = 0,}); in test_btf_dump_struct_data()
H A Dbtf_split.c48 ASSERT_STREQ(btf__str_by_offset(btf2, t->name_off), "int", "int_name"); in test_btf_split()
64 ASSERT_STREQ(btf__str_by_offset(btf2, t->name_off), "s2", "split_struct_name"); in test_btf_split()
H A Dlibbpf_probes.c27 const char *prog_type_name = btf__str_by_offset(btf, e->name_off); in test_libbpf_probe_prog_types()
67 const char *map_type_name = btf__str_by_offset(btf, e->name_off); in test_libbpf_probe_map_types()
/linux/tools/lib/bpf/
H A Dbtf_iter.c98 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()
105 1, {offsetof(struct btf_enum, name_off)} in btf_field_iter_init()
110 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
112 1, {offsetof(struct btf_enum64, name_off)} in btf_field_iter_init()
118 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
120 1, {offsetof(struct btf_member, name_off)} in btf_field_iter_init()
125 1, {offsetof(struct btf_type, name_off)}, in btf_field_iter_init()
127 1, {offsetof(struct btf_param, name_off)} in btf_field_iter_init()
H A Dbtf.c335 t->name_off = bswap_32(t->name_off); in btf_bswap_type_base()
367 e->name_off = bswap_32(e->name_off); in btf_bswap_type_rest()
373 e64->name_off = bswap_32(e64->name_off); in btf_bswap_type_rest()
387 m->name_off = bswap_32(m->name_off); in btf_bswap_type_rest()
394 p->name_off = bswap_32(p->name_off); in btf_bswap_type_rest()
486 err = btf_validate_str(btf, t->name_off, "type name", id); in btf_validate_type()
523 err = btf_validate_str(btf, m->name_off, "field name", id); in btf_validate_type()
535 err = btf_validate_str(btf, m->name_off, "enum name", id); in btf_validate_type()
546 err = btf_validate_str(btf, m->name_off, "enum name", id); in btf_validate_type()
570 err = btf_validate_str(btf, m->name_off, "param name", id); in btf_validate_type()
[all …]
H A Dbtf_relocate.c203 info[id].name = btf__name_by_offset(r->dist_base_btf, dist_t->name_off); in btf_relocate_map_distilled_base()
232 if (!btf_is_composite(base_t) || !base_t->name_off) in btf_relocate_map_distilled_base()
234 if (base_name_cnt[base_t->name_off] < 255) in btf_relocate_map_distilled_base()
235 base_name_cnt[base_t->name_off]++; in btf_relocate_map_distilled_base()
245 if (!base_t->name_off) in btf_relocate_map_distilled_base()
249 base_info.name = btf__name_by_offset(r->base_btf, base_t->name_off); in btf_relocate_map_distilled_base()
271 base_info.needs_size = base_name_cnt[base_t->name_off] > 1; in btf_relocate_map_distilled_base()
360 r->str_map[dist_t->name_off] = base_t->name_off; in btf_relocate_map_distilled_base()
370 name = btf__name_by_offset(r->dist_base_btf, dist_t->name_off); in btf_relocate_map_distilled_base()
398 if (t->name_off) in btf_relocate_validate_distilled_base()
H A Dbtf_dump.c132 static const char *btf_name_of(const struct btf_dump *d, __u32 name_off) in btf_name_of() argument
134 return btf__name_by_offset(d->btf, name_off); in btf_name_of()
496 if (btf_is_composite(t) && through_ptr && t->name_off != 0) in btf_dump_order_type()
524 if (through_ptr && t->name_off != 0) in btf_dump_order_type()
536 if (t->name_off != 0) { in btf_dump_order_type()
553 if (t->name_off != 0 || !tstate->referenced) { in btf_dump_order_type()
663 if (t->name_off == 0) in btf_dump_is_blacklisted()
665 return strcmp(btf_name_of(d, t->name_off), "__builtin_va_list") == 0; in btf_dump_is_blacklisted()
712 if (t->name_off == 0) { in btf_dump_emit_type()
796 if (top_level_def || t->name_off == 0) { in btf_dump_emit_type()
[all …]
H A Dlinker.c85 int name_off; member
1033 int name_off; in init_sec() local
1058 name_off = strset__add_str(linker->strtab_strs, src_sec->sec_name); in init_sec()
1059 if (name_off < 0) in init_sec()
1060 return name_off; in init_sec()
1062 shdr->sh_name = name_off; in init_sec()
1342 name = strset__data(linker->strtab_strs) + glob_sym->name_off; in find_glob_sym()
1386 n1 = btf__str_by_offset(btf1, t1->name_off); in glob_sym_btf_matches()
1387 n2 = btf__str_by_offset(btf2, t2->name_off); in glob_sym_btf_matches()
1426 n1 = btf__str_by_offset(btf1, t1->name_off); in glob_sym_btf_matches()
[all …]
/linux/kernel/bpf/preload/iterators/
H A Diterators.bpf.c27 __u32 name_off; member
62 unsigned int name_off; in get_name() local
70 name_off = BPF_CORE_READ(t, name_off); in get_name()
71 if (name_off >= btf->hdr.str_len) in get_name()
73 return str + name_off; in get_name()
/linux/tools/bpf/bpftool/
H A Dbtf.c127 jsonw_string_field(w, "name", btf_str(btf, t->name_off)); in dump_btf_type()
130 btf_str(btf, t->name_off)); in dump_btf_type()
191 const char *name = btf_str(btf, m->name_off); in dump_btf_type()
240 const char *name = btf_str(btf, v->name_off); in dump_btf_type()
278 const char *name = btf_str(btf, v->name_off); in dump_btf_type()
337 const char *name = btf_str(btf, p->name_off); in dump_btf_type()
395 btf_str(btf, vt->name_off)); in dump_btf_type()
506 return strcmp(btf__str_by_offset(btf, a->name_off), in cmp_kfuncs()
507 btf__str_by_offset(btf, b->name_off)); in cmp_kfuncs()
536 name = btf__name_by_offset(btf, t->name_off); in dump_btf_kfuncs()
[all …]
H A Dbtf_dumper.c84 prog_name = btf__name_by_offset(prog_btf, func_type->name_off); in dump_prog_id_as_func_ptr()
176 enums[i].name_off)); in btf_dumper_enum()
202 enums[i].name_off)); in btf_dumper_enum64()
231 strcmp("char", btf__name_by_offset(btf, elem_type->name_off))) in is_str_array()
493 jsonw_name(d->jw, btf__name_by_offset(d->btf, m[i].name_off)); in btf_dumper_struct()
520 jsonw_name(d->jw, btf__name_by_offset(d->btf, t->name_off)); in btf_dumper_var()
542 jsonw_name(d->jw, btf__name_by_offset(d->btf, t->name_off)); in btf_dumper_datasec()
638 BTF_PRINT_ARG("%s ", btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
642 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
646 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
[all …]
H A Dgen.c153 const char *sec_name = btf__name_by_offset(btf, sec->name_off); in codegen_datasec_def()
168 const char *var_name = btf__name_by_offset(btf, var->name_off); in codegen_datasec_def()
247 name = btf__str_by_offset(btf, t->name_off); in find_type_for_map()
350 sec_name = btf__name_by_offset(btf, sec->name_off); in codegen_subskel_datasecs()
368 var_name = btf__name_by_offset(btf, var->name_off); in codegen_subskel_datasecs()
534 const char *var_name = btf__name_by_offset(btf, var->name_off); in codegen_asserts()
983 member_name = btf__name_by_offset(btf, m->name_off); in walk_st_ops_shadow_vars()
1093 type_name = btf__name_by_offset(btf, map_type->name_off); in gen_st_ops_shadow_type()
1817 var_name = btf__name_by_offset(btf, var_type->name_off); in do_subskeleton()
2027 m->name_off = MARKED; in btfgen_mark_member()
[all …]
/linux/include/uapi/linux/
H A Dbtf.h32 __u32 name_off; member
106 __u32 name_off; member
123 __u32 name_off; member
146 __u32 name_off; member
195 __u32 name_off; member
/linux/tools/include/uapi/linux/
H A Dbtf.h32 __u32 name_off; member
106 __u32 name_off; member
123 __u32 name_off; member
146 __u32 name_off; member
195 __u32 name_off; member
/linux/tools/testing/selftests/bpf/progs/
H A Dnetif_receive_skb.c186 {.name_off = (__u32)3,.val = (__s32)-1,}); in BPF_PROG()
188 { .name_off = 3, .val = -1,}); in BPF_PROG()
190 { .name_off = 0, .val = -1,}); in BPF_PROG()
192 { .name_off = 0, .val = -1,}); in BPF_PROG()
195 { .name_off = 0, .val = 0,}); in BPF_PROG()
197 { .name_off = 0, .val = 0,}); in BPF_PROG()
200 { .name_off = 0, .val = 0,}); in BPF_PROG()
/linux/tools/testing/selftests/bpf/
H A Dbtf_helpers.c101 fprintf(out, "[%u] %s '%s'", id, btf_kind_str(kind), btf_str(btf, t->name_off)); in fprintf_btf_type_raw()
135 btf_str(btf, m->name_off), m->type, bit_off); in fprintf_btf_type_raw()
150 btf_str(btf, v->name_off), v->val); in fprintf_btf_type_raw()
164 btf_str(btf, v->name_off), in fprintf_btf_type_raw()
181 btf_str(btf, p->name_off), p->type); in fprintf_btf_type_raw()
/linux/kernel/bpf/
H A Dbtf.c186 #define BTF_STR_OFFSET_VALID(name_off) ((name_off) <= BTF_MAX_NAME_OFFSET) argument
563 tname = btf_name_by_offset(btf, t->name_off); in btf_find_by_name_kind()
981 member = btf_name_by_offset(show->btf, m->name_off); in btf_show_name()
1025 t->name_off); in btf_show_name()
1058 name = btf_name_by_offset(show->btf, t->name_off); in btf_show_name()
1462 __btf_name_by_offset(btf, t->name_off), in __btf_verifier_log_type()
1517 __btf_name_by_offset(btf, member->name_off), in btf_verifier_log_member()
1523 __btf_name_by_offset(btf, member->name_off), in btf_verifier_log_member()
2597 if (!t->name_off || in btf_ref_type_check_meta()
2598 !btf_name_valid_identifier(env->btf, t->name_off)) { in btf_ref_type_check_meta()
[all …]
/linux/Documentation/bpf/
H A Dbtf.rst98 __u32 name_off;
122 ``name_off`` in ``struct btf_type`` specifies the offset in the string table.
129 * ``name_off``: any valid offset
181 * ``name_off``: 0
193 * ``name_off``: 0
238 * ``name_off``: 0 or offset to a valid C identifier
247 __u32 name_off;
253 * ``name_off``: offset to a valid C identifier
282 * ``name_off``: 0 or offset to a valid C identifier
291 __u32 name_off;
[all …]
/linux/tools/sched_ext/include/scx/
H A Dcompat.h45 n = btf__name_by_offset(__COMPAT_vmlinux_btf, e[i].name_off); in __COMPAT_read_enum()
56 n = btf__name_by_offset(__COMPAT_vmlinux_btf, e[i].name_off); in __COMPAT_read_enum()
100 n = btf__name_by_offset(__COMPAT_vmlinux_btf, m[i].name_off); in __COMPAT_struct_has_field()
/linux/kernel/trace/
H A Dtrace_btf.c92 if (!member->name_off) { in btf_find_struct_member()
101 name = btf_name_by_offset(btf, member->name_off); in btf_find_struct_member()
/linux/fs/ntfs3/
H A Drecord.c290 if (t32 && le16_to_cpu(attr->name_off) + t32 > t16) in mi_enum_attr()
309 if (t32 && le16_to_cpu(attr->name_off) + t32 > t16) in mi_enum_attr()
472 u16 name_off) in mi_insert_attr() argument
519 attr->name_off = cpu_to_le16(name_off); in mi_insert_attr()
522 memmove(Add2Ptr(attr, name_off), name, name_len * sizeof(short)); in mi_insert_attr()
H A Dfrecord.c460 const __le16 *name, u8 name_len, u32 asize, u16 name_off, in ni_ins_new_attr() argument
488 attr = mi_insert_attr(mi, type, name, name_len, asize, name_off); in ni_ins_new_attr()
745 le16_to_cpu(attr->name_off)); in ni_try_remove_attr_list()
839 le->name_off = offsetof(struct ATTR_LIST_ENTRY, name); in ni_create_attr_list()
887 u16 name_off = le16_to_cpu(b->name_off); in ni_create_attr_list() local
889 attr = mi_insert_attr(mi, b->type, Add2Ptr(b, name_off), in ni_create_attr_list()
890 b->name_len, asize, name_off); in ni_create_attr_list()
943 u32 asize, CLST svcn, u16 name_off, bool force_ext, in ni_ins_attr_ext() argument
1025 name_off, svcn, ins_le); in ni_ins_attr_ext()
1050 name_off, svcn, ins_le); in ni_ins_attr_ext()
[all …]
/linux/fs/smb/server/
H A Dsmb2misc.c111 unsigned short int name_off = in smb2_get_data_area_len() local
126 if (name_off + name_len < (u64)*off + *len) in smb2_get_data_area_len()
130 *off = name_off; in smb2_get_data_area_len()

123