Lines Matching refs:hdr
208 struct btf_header hdr; member
526 offset < btf->hdr.str_len; in btf_name_offset_valid()
578 else if (offset < btf->hdr.str_len) in __btf_name_by_offset()
586 if (offset < btf->hdr.str_len) in btf_name_by_offset()
800 const struct btf_header *hdr; in btf_verifier_log_hdr() local
805 hdr = &btf->hdr; in btf_verifier_log_hdr()
806 __btf_verifier_log(log, "magic: 0x%x\n", hdr->magic); in btf_verifier_log_hdr()
807 __btf_verifier_log(log, "version: %u\n", hdr->version); in btf_verifier_log_hdr()
808 __btf_verifier_log(log, "flags: 0x%x\n", hdr->flags); in btf_verifier_log_hdr()
809 __btf_verifier_log(log, "hdr_len: %u\n", hdr->hdr_len); in btf_verifier_log_hdr()
810 __btf_verifier_log(log, "type_off: %u\n", hdr->type_off); in btf_verifier_log_hdr()
811 __btf_verifier_log(log, "type_len: %u\n", hdr->type_len); in btf_verifier_log_hdr()
812 __btf_verifier_log(log, "str_off: %u\n", hdr->str_off); in btf_verifier_log_hdr()
813 __btf_verifier_log(log, "str_len: %u\n", hdr->str_len); in btf_verifier_log_hdr()
2969 struct btf_header *hdr; in btf_check_all_metas() local
2972 hdr = &btf->hdr; in btf_check_all_metas()
2973 cur = btf->nohdr_data + hdr->type_off; in btf_check_all_metas()
2974 end = cur + hdr->type_len; in btf_check_all_metas()
3103 const struct btf_header *hdr = &env->btf->hdr; in btf_parse_type_sec() local
3107 if (hdr->type_off & (sizeof(u32) - 1)) { in btf_parse_type_sec()
3112 if (!hdr->type_len) { in btf_parse_type_sec()
3126 const struct btf_header *hdr; in btf_parse_str_sec() local
3130 hdr = &btf->hdr; in btf_parse_str_sec()
3131 start = btf->nohdr_data + hdr->str_off; in btf_parse_str_sec()
3132 end = start + hdr->str_len; in btf_parse_str_sec()
3139 if (!hdr->str_len || hdr->str_len - 1 > BTF_MAX_NAME_OFFSET || in btf_parse_str_sec()
3168 const struct btf_header *hdr; in btf_check_sec_info() local
3172 hdr = &btf->hdr; in btf_check_sec_info()
3176 secs[i] = *(struct btf_sec_info *)((void *)hdr + in btf_check_sec_info()
3184 expected_total = btf_data_size - hdr->hdr_len; in btf_check_sec_info()
3219 const struct btf_header *hdr; in btf_parse_hdr() local
3227 offsetof(struct btf_header, hdr_len) + sizeof(hdr->hdr_len)) { in btf_parse_hdr()
3232 hdr = btf->data; in btf_parse_hdr()
3233 hdr_len = hdr->hdr_len; in btf_parse_hdr()
3240 if (hdr_len > sizeof(btf->hdr)) { in btf_parse_hdr()
3241 u8 *expected_zero = btf->data + sizeof(btf->hdr); in btf_parse_hdr()
3252 hdr_copy = min_t(u32, hdr_len, sizeof(btf->hdr)); in btf_parse_hdr()
3253 memcpy(&btf->hdr, btf->data, hdr_copy); in btf_parse_hdr()
3255 hdr = &btf->hdr; in btf_parse_hdr()
3259 if (hdr->magic != BTF_MAGIC) { in btf_parse_hdr()
3264 if (hdr->version != BTF_VERSION) { in btf_parse_hdr()
3269 if (hdr->flags) { in btf_parse_hdr()
3274 if (btf_data_size == hdr->hdr_len) { in btf_parse_hdr()
3344 btf->nohdr_data = btf->data + btf->hdr.hdr_len; in btf_parse()