Re: [PATCH bpf-next 1/2] bpf: btf: Check array t->size

2018-06-02 Thread Alexei Starovoitov
On Sat, Jun 02, 2018 at 09:06:50AM -0700, Martin KaFai Lau wrote: > This patch ensures array's t->size is 0. > > The array size is decided by its individual elem's size and the > number of elements. Hence, t->size is not used and > it must be 0. > > A test case is added to test_btf.c > > Signed

[PATCH bpf-next 1/2] bpf: btf: Check array t->size

2018-06-02 Thread Martin KaFai Lau
This patch ensures array's t->size is 0. The array size is decided by its individual elem's size and the number of elements. Hence, t->size is not used and it must be 0. A test case is added to test_btf.c Signed-off-by: Martin KaFai Lau --- kernel/bpf/btf.c | 5 + t