Home
last modified time | relevance | path

Searched refs:btf_header (Results 1 – 17 of 17) sorted by relevance

/linux/tools/lib/bpf/
H A Dbtf_relocate.c447 const struct btf_header *dist_base_hdr; in btf_relocate()
448 const struct btf_header *base_hdr; in btf_relocate()
464 r.str_map = calloc(btf_header(r.dist_base_btf)->str_len, sizeof(*r.str_map)); in btf_relocate()
465 dist_base_hdr = btf_header(r.dist_base_btf); in btf_relocate()
466 base_hdr = btf_header(r.base_btf); in btf_relocate()
H A Dlibbpf_probes.c221 int libbpf__load_raw_btf_hdr(const struct btf_header *hdr, const char *raw_types, in libbpf__load_raw_btf()
253 struct btf_header hdr = { in libbpf__load_raw_btf()
256 .hdr_len = sizeof(struct btf_header), in load_local_storage_btf()
H A Dlibbpf_internal.h250 const struct btf_header *btf_header(const struct btf *btf);
433 int libbpf__load_raw_btf_hdr(const struct btf_header *hdr,
H A Dbtf.c119 struct btf_header hdr;
271 static void btf_bswap_hdr(struct btf_header *h, __u32 hdr_len) in btf_bswap_hdr()
280 if (hdr_len >= sizeof(struct btf_header)) { in btf_bswap_hdr()
288 struct btf_header *hdr = btf->raw_data; in btf_parse_hdr()
291 if (btf->raw_size < offsetofend(struct btf_header, str_len)) { in btf_parse_hdr()
301 if (hdr_len < offsetofend(struct btf_header, str_len)) { in btf_parse_hdr()
320 memcpy(&btf->hdr, hdr, min((size_t)hdr_len, sizeof(struct btf_header))); in btf_parse_hdr()
325 if (hdr_len > sizeof(struct btf_header)) { in btf_parse_hdr()
329 for (i = sizeof(struct btf_header); i < hdr_len; i++) { in btf_parse_hdr()
1220 struct btf_header *hdr; in btf_new_empty()
[all …]
H A Dfeatures.c603 struct btf_header hdr = { in probe_kern_btf_layout()
606 .hdr_len = sizeof(struct btf_header), in probe_kern_btf_layout()
H A Dlibbpf.c3189 const struct btf_header *hdr; in bpf_object__sanitize_btf()
3202 hdr = btf_header(orig_btf); in bpf_object__sanitize_btf()
3204 if (!has_layout && hdr->hdr_len >= sizeof(struct btf_header) && in bpf_object__sanitize_btf()
3206 const struct btf_header *old_hdr = raw_data; in bpf_object__sanitize_btf()
3207 struct btf_header *new_hdr; in bpf_object__sanitize_btf()
/linux/kernel/bpf/preload/iterators/
H A Diterators.bpf.c30 struct btf_header { struct
37 struct btf_header hdr; argument
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcore_reloc_raw.c23 struct btf_header hdr; in test_bad_local_id()
30 .hdr_len = sizeof(struct btf_header), in test_bad_local_id()
H A Dfd_array.c25 struct btf_header btf_hdr; in new_btf()
32 .hdr_len = sizeof(struct btf_header), in new_btf()
H A Dbtf_endian.c21 const struct btf_header *hdr; in test_btf_endian()
H A Dbtf.c48 static struct btf_header hdr_tmpl = {
51 .hdr_len = sizeof(struct btf_header),
4357 static void *btf_raw_create(const struct btf_header *hdr, in btf_raw_create()
4368 struct btf_header *ret_hdr; in btf_raw_create()
4433 ret_hdr = (struct btf_header *)raw_btf; in btf_raw_create()
4480 struct btf_header *hdr; in do_test_raw()
8227 const struct btf_header *test_hdr, *expect_hdr; in do_test_dedup()
/linux/tools/testing/selftests/bpf/progs/
H A Dsyscall.c71 struct btf_header btf_hdr; in btf_load()
78 .hdr_len = sizeof(struct btf_header), in btf_load()
/linux/tools/include/uapi/linux/
H A Dbtf.h21 struct btf_header { argument
11 struct btf_header { global() struct
12 magicbtf_header global() argument
13 versionbtf_header global() argument
14 flagsbtf_header global() argument
15 hdr_lenbtf_header global() argument
18 type_offbtf_header global() argument
19 type_lenbtf_header global() argument
20 str_offbtf_header global() argument
/linux/tools/testing/selftests/bpf/map_tests/
H A Dsk_storage_map.c123 struct btf_header btf_hdr = { in load_btf()
126 .hdr_len = sizeof(struct btf_header), in load_btf()
131 __u8 raw_btf[sizeof(struct btf_header) + sizeof(btf_raw_types) + in load_btf()
/linux/include/linux/
H A Dbtf.h148 const struct btf_header *btf_header(const struct btf *btf);
/linux/kernel/bpf/
H A Dbtf.c261 struct btf_header hdr;
1695 const struct btf_header *hdr; in btf_verifier_log_hdr()
1711 if (hdr->hdr_len >= sizeof(struct btf_header) && in btf_verifier_log_hdr()
1914 const struct btf_header *btf_header(const struct btf *btf) in btf_header() function
5411 struct btf_header *hdr; in btf_check_all_metas()
5545 const struct btf_header *hdr = &env->btf->hdr; in btf_parse_type_sec()
5568 const struct btf_header *hdr; in btf_parse_str_sec()
5576 if (hdr->hdr_len < sizeof(struct btf_header) && in btf_parse_str_sec()
5600 const struct btf_header *hdr = &env->btf->hdr; in btf_parse_layout_sec()
5604 if (hdr->hdr_len < sizeof(struct btf_header) || in btf_parse_layout_sec()
[all …]
/linux/tools/testing/selftests/bpf/
H A Dtest_verifier.c742 struct btf_header hdr = { in load_btf_spec()
745 .hdr_len = sizeof(struct btf_header), in load_btf_spec()