Re: [PATCH v2 bpf-next 1/3] bpf: fix BTF verifier size resolution logic

2019-07-12 Thread Andrii Nakryiko
On Fri, Jul 12, 2019 at 8:47 AM Yonghong Song wrote: > > > > On 7/12/19 8:36 AM, Andrii Nakryiko wrote: > > On Thu, Jul 11, 2019 at 10:59 PM Yonghong Song wrote: > >> > >> > >> > >> On 7/10/19 11:53 PM, Andrii Nakryiko wrote: > >>> BTF verifier has a size resolution bug which in some circumstance

Re: [PATCH v2 bpf-next 1/3] bpf: fix BTF verifier size resolution logic

2019-07-12 Thread Yonghong Song
On 7/12/19 8:36 AM, Andrii Nakryiko wrote: > On Thu, Jul 11, 2019 at 10:59 PM Yonghong Song wrote: >> >> >> >> On 7/10/19 11:53 PM, Andrii Nakryiko wrote: >>> BTF verifier has a size resolution bug which in some circumstances leads to >>> invalid size resolution for, e.g., TYPEDEF modifier. Thi

Re: [PATCH v2 bpf-next 1/3] bpf: fix BTF verifier size resolution logic

2019-07-12 Thread Andrii Nakryiko
On Thu, Jul 11, 2019 at 10:59 PM Yonghong Song wrote: > > > > On 7/10/19 11:53 PM, Andrii Nakryiko wrote: > > BTF verifier has a size resolution bug which in some circumstances leads to > > invalid size resolution for, e.g., TYPEDEF modifier. This happens if we > > have > > [1] PTR -> [2] TYPEDE

Re: [PATCH v2 bpf-next 1/3] bpf: fix BTF verifier size resolution logic

2019-07-11 Thread Yonghong Song
On 7/10/19 11:53 PM, Andrii Nakryiko wrote: > BTF verifier has a size resolution bug which in some circumstances leads to > invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have > [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer > context ARRAY si

[PATCH v2 bpf-next 1/3] bpf: fix BTF verifier size resolution logic

2019-07-10 Thread Andrii Nakryiko
BTF verifier has a size resolution bug which in some circumstances leads to invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer context ARRAY size won't be resolved (because for pointer it doesn't m