Lines Matching refs:hdr
208 struct btf_header hdr; member
634 return offset < btf->hdr.str_len; in btf_name_offset_valid()
653 if (offset < btf->hdr.str_len) in btf_str_by_offset()
1422 const struct btf_header *hdr; in btf_verifier_log_hdr() local
1429 hdr = &btf->hdr; in btf_verifier_log_hdr()
1430 __btf_verifier_log(log, "magic: 0x%x\n", hdr->magic); in btf_verifier_log_hdr()
1431 __btf_verifier_log(log, "version: %u\n", hdr->version); in btf_verifier_log_hdr()
1432 __btf_verifier_log(log, "flags: 0x%x\n", hdr->flags); in btf_verifier_log_hdr()
1433 __btf_verifier_log(log, "hdr_len: %u\n", hdr->hdr_len); in btf_verifier_log_hdr()
1434 __btf_verifier_log(log, "type_off: %u\n", hdr->type_off); in btf_verifier_log_hdr()
1435 __btf_verifier_log(log, "type_len: %u\n", hdr->type_len); in btf_verifier_log_hdr()
1436 __btf_verifier_log(log, "str_off: %u\n", hdr->str_off); in btf_verifier_log_hdr()
1437 __btf_verifier_log(log, "str_len: %u\n", hdr->str_len); in btf_verifier_log_hdr()
4001 struct btf_header *hdr; in btf_check_all_metas() local
4004 hdr = &btf->hdr; in btf_check_all_metas()
4005 cur = btf->nohdr_data + hdr->type_off; in btf_check_all_metas()
4006 end = cur + hdr->type_len; in btf_check_all_metas()
4137 const struct btf_header *hdr = &env->btf->hdr; in btf_parse_type_sec() local
4141 if (hdr->type_off & (sizeof(u32) - 1)) { in btf_parse_type_sec()
4146 if (!env->btf->base_btf && !hdr->type_len) { in btf_parse_type_sec()
4160 const struct btf_header *hdr; in btf_parse_str_sec() local
4164 hdr = &btf->hdr; in btf_parse_str_sec()
4165 start = btf->nohdr_data + hdr->str_off; in btf_parse_str_sec()
4166 end = start + hdr->str_len; in btf_parse_str_sec()
4175 if (btf->base_btf && !hdr->str_len) in btf_parse_str_sec()
4177 if (!hdr->str_len || hdr->str_len - 1 > BTF_MAX_NAME_OFFSET || end[-1]) { in btf_parse_str_sec()
4207 const struct btf_header *hdr; in btf_check_sec_info() local
4211 hdr = &btf->hdr; in btf_check_sec_info()
4215 secs[i] = *(struct btf_sec_info *)((void *)hdr + in btf_check_sec_info()
4223 expected_total = btf_data_size - hdr->hdr_len; in btf_check_sec_info()
4258 const struct btf_header *hdr; in btf_parse_hdr() local
4266 offsetof(struct btf_header, hdr_len) + sizeof(hdr->hdr_len)) { in btf_parse_hdr()
4271 hdr = btf->data; in btf_parse_hdr()
4272 hdr_len = hdr->hdr_len; in btf_parse_hdr()
4279 if (hdr_len > sizeof(btf->hdr)) { in btf_parse_hdr()
4280 u8 *expected_zero = btf->data + sizeof(btf->hdr); in btf_parse_hdr()
4291 hdr_copy = min_t(u32, hdr_len, sizeof(btf->hdr)); in btf_parse_hdr()
4292 memcpy(&btf->hdr, btf->data, hdr_copy); in btf_parse_hdr()
4294 hdr = &btf->hdr; in btf_parse_hdr()
4298 if (hdr->magic != BTF_MAGIC) { in btf_parse_hdr()
4303 if (hdr->version != BTF_VERSION) { in btf_parse_hdr()
4308 if (hdr->flags) { in btf_parse_hdr()
4313 if (!btf->base_btf && btf_data_size == hdr->hdr_len) { in btf_parse_hdr()
4382 btf->nohdr_data = btf->data + btf->hdr.hdr_len; in btf_parse()
4592 btf->nohdr_data = btf->data + btf->hdr.hdr_len; in BTF_ID()
4661 btf->start_str_off = base_btf->hdr.str_len; in btf_parse_module()
4677 btf->nohdr_data = btf->data + btf->hdr.hdr_len; in btf_parse_module()