[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+YzC15pw=30uS3Vo27-cZp=V=CdnG5vYDYrULVLKvj=YQ@mail.gmail.com>
Date: Tue, 11 Sep 2018 18:40:05 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Martin KaFai Lau <kafai@...com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: bpf: btf: Change how section is supported in btf_header
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
Powered by blists - more mailing lists