Hi Martin,

I am looking at the subj commit:

 static int btf_add_type(struct btf_verifier_env *env, struct btf_type *t)
@@ -1754,9 +1756,9 @@ static int btf_check_all_metas(struct
btf_verifier_env *env)
        struct btf_header *hdr;
        void *cur, *end;

-       hdr = btf->hdr;
+       hdr = &btf->hdr;
        cur = btf->nohdr_data + hdr->type_off;
-       end = btf->nohdr_data + hdr->str_off;
+       end = btf->nohdr_data + hdr->type_len;

Shouldn't this be:

+       end = cur + hdr->type_len;

? Or otherwise I am having trouble understanding meaning of fields.

On a related note, what's between header and type_off? Is type_off
supposed to be 0 always?

Thanks

Reply via email to