Home
last modified time | relevance | path

Searched refs:str_off (Results 1 – 20 of 20) sorted by relevance

/linux/tools/lib/bpf/
H A Dbtf_relocate.c416 __u32 *str_off; in btf_relocate_rewrite_strs() local
423 while ((str_off = btf_field_iter_next(&it))) { in btf_relocate_rewrite_strs()
424 if (!*str_off) in btf_relocate_rewrite_strs()
426 if (*str_off >= r->dist_str_len) { in btf_relocate_rewrite_strs()
427 *str_off += r->base_str_len - r->dist_str_len; in btf_relocate_rewrite_strs()
429 off = r->str_map[*str_off]; in btf_relocate_rewrite_strs()
432 btf__str_by_offset(r->btf, off), *str_off); in btf_relocate_rewrite_strs()
435 *str_off = off; in btf_relocate_rewrite_strs()
H A Dlinker.c361 int err, str_off; in init_output_elf() local
409 str_off = strset__add_str(linker->strtab_strs, sec->sec_name); in init_output_elf()
410 if (str_off < 0) in init_output_elf()
411 return str_off; in init_output_elf()
417 sec->shdr->sh_name = str_off; in init_output_elf()
450 str_off = strset__add_str(linker->strtab_strs, sec->sec_name); in init_output_elf()
451 if (str_off < 0) in init_output_elf()
452 return str_off; in init_output_elf()
457 sec->shdr->sh_name = str_off; in init_output_elf()
1073 static int check_btf_str_off(__u32 *str_off, voi argument
1097 __u32 *type_id, *str_off; linker_sanity_check_btf() local
2636 int rec_sz, str_off, i; linker_append_btf_ext() local
2946 int str_off; emit_btf_ext_data() local
[all...]
H A Dbtf.c280 h->str_off = bswap_32(h->str_off); in btf_bswap_hdr()
343 if (meta_left < (long long)btf->hdr.str_off + btf->hdr.str_len) { in btf_parse_hdr()
348 if ((long long)btf->hdr.type_off + btf->hdr.type_len > btf->hdr.str_off) { in btf_parse_hdr()
350 btf->hdr.type_off, btf->hdr.type_len, btf->hdr.str_off, in btf_parse_hdr()
374 if ((long long)btf->hdr.layout_off + btf->hdr.layout_len > btf->hdr.str_off || in btf_parse_hdr()
375 btf->hdr.layout_off > btf->hdr.str_off) { in btf_parse_hdr()
377 btf->hdr.layout_off, btf->hdr.layout_len, btf->hdr.str_off); in btf_parse_hdr()
644 static int btf_validate_str(const struct btf *btf, __u32 str_off, const char *what, __u32 type_id) in btf_validate_type()
648 s = btf__str_by_offset(btf, str_off); in btf_validate_type()
615 btf_validate_str(const struct btf * btf,__u32 str_off,const char * what,__u32 type_id) btf_validate_str() argument
2167 btf_rewrite_str(struct btf_pipe * p,__u32 * str_off) btf_rewrite_str() argument
2202 __u32 *str_off; btf_add_type() local
2293 __u32 *type_id, *str_off; btf__add_btf() local
4148 __u32 *str_off; btf_for_each_str_off() local
4174 __u32 str_off = *str_off_ptr; strs_dedup_remap_str_off() local
[all...]
H A Dlibbpf_probes.c242 memcpy(raw_btf + hdr->hdr_len + hdr->str_off, str_sec, hdr->str_len); in libbpf__load_raw_btf()
261 .str_off = types_len, in load_local_storage_btf()
H A Dfeatures.c684 .str_off = sizeof(types) + sizeof(layout),
H A Dlibbpf_internal.h603 typedef int (*str_off_visit_fn)(__u32 *str_off, void *ctx); in libbpf_err()
H A Dlibbpf.c3271 new_hdr->str_off = bswap_32(new_str_off); in bpf_object__sanitize_btf()
3273 new_hdr->str_off = new_str_off; in bpf_object__sanitize_btf()
3276 new_raw_data + hdr->hdr_len + hdr->str_off, in bpf_object__sanitize_btf()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbtf_split.c54 int str_off, i, err; in test_btf_split()
76 str_off = btf__find_str(btf2, "int"); in test_btf_split()
77 ASSERT_NEQ(str_off, -ENOENT, "str_int_missing"); in test_btf_split()
19 int str_off, i, err; test_btf_split() local
H A Dbtf_write.c15 int id, err, str_off; in gen_btf() local
17 str_off = btf__find_str(btf, "int"); in gen_btf()
18 ASSERT_EQ(str_off, -ENOENT, "int_str_missing_off"); in gen_btf()
20 str_off = btf__add_str(btf, "int"); in gen_btf()
21 ASSERT_EQ(str_off, 1, "int_str_off"); in gen_btf()
23 str_off = btf__find_str(btf, "int"); in gen_btf()
24 ASSERT_EQ(str_off, 1, "int_str_found_off"); in gen_btf()
32 ASSERT_EQ(t->name_off, str_off, "int_name_off"); in gen_btf()
H A Dbtf_dedup_split.c10 int str_off, err; in test_split_simple() local
47 str_off = btf__find_str(btf2, "int"); in test_split_simple()
48 ASSERT_NEQ(str_off, -ENOENT, "str_int_missing"); in test_split_simple()
H A Dcore_reloc_raw.c86 .str_off = offsetof(struct test_btf, strings) - in test_early_core_relo()
224 .str_off = offsetof(struct test_btf, strings) - in test_bad_local_id()
H A Dfd_array.c34 .str_off = offsetof(struct btf_blob, str) - offsetof(struct btf_blob, types), in new_btf()
H A Dbtf.c4497 ret_hdr->str_off = type_sec_size; in do_test_raw()
4561 hdr->str_off = (int)hdr->str_off + test->str_off_delta;
6638 const char *str, __u32 str_off, in test_get_finfo()
6644 const char *next_str = str + str_off; in test_get_finfo()
8474 test_strs = test_btf_data + sizeof(*test_hdr) + test_hdr->str_off;
8476 expect_strs = expect_btf_data + sizeof(*test_hdr) + expect_hdr->str_off;
6576 patch_name_tbd(const __u32 * raw_u32,const char * str,__u32 str_off,unsigned int str_sec_size,unsigned int * ret_size) patch_name_tbd() argument
/linux/tools/testing/selftests/filesystems/statmount/
H A Dstatmount_test.c912 #define str_off(memb) (offsetof(struct statmount, memb) / sizeof(uint32_t))
939 test_statmount_string(STATMOUNT_MNT_ROOT, str_off(mnt_root), "mount root");
940 test_statmount_string(STATMOUNT_MNT_POINT, str_off(mnt_point), "mount point");
941 test_statmount_string(STATMOUNT_FS_TYPE, str_off(fs_type), "fs type");
942 test_statmount_string(all_mask, str_off(mnt_root), "mount root & all");
943 test_statmount_string(all_mask, str_off(mnt_point), "mount point & all");
944 test_statmount_string(all_mask, str_off(fs_type), "fs type & all");
854 #define str_off( global() macro
/linux/tools/include/uapi/linux/
H A Dbtf.h30 __u32 str_off; /* offset of string section */
20 __u32 str_off; /* offset of string section */ global() member
/linux/tools/testing/selftests/bpf/progs/
H A Dsyscall.c80 .str_off = offsetof(struct btf_blob, str) - offsetof(struct btf_blob, types), in btf_load()
/linux/tools/testing/selftests/bpf/map_tests/
H A Dsk_storage_map.c128 .str_off = sizeof(btf_raw_types), in load_btf()
/linux/arch/sparc/kernel/
H A Dds.c419 __u32 str_off; member
/linux/tools/testing/selftests/bpf/
H A Dtest_verifier.c747 .str_off = types_len, in load_btf_spec()
/linux/kernel/bpf/
H A Dbtf.c1737 __btf_verifier_log(log, "str_off: %u\n", hdr->str_off); in btf_add_type()
6058 start = btf->nohdr_data + hdr->str_off; in btf_parse()
6121 offsetof(struct btf_header, str_off),
7051 u32 *id, *str_off; in btf_ctx_access()
7073 while ((str_off = btf_field_iter_next(&it))) { in btf_ctx_access()
7074 if (!*str_off) in btf_ctx_access()
7076 if (*str_off < old_module_start_str_off) { in btf_ctx_access()
7080 if (!module_str_map || !module_str_map[*str_off]) in btf_ctx_access()
7082 *str_off in btf_ctx_access()
[all...]