Re: [PATCH bpf-next 1/3] bpf: pass struct btf pointer to the map_check_btf() callback

2018-12-08 Thread Martin Lau
On Fri, Dec 07, 2018 at 04:53:13PM -0800, Roman Gushchin wrote: > If key_type or value_type are of non-trivial data types > (e.g. structure or typedef), it's not possible to check them without > the additional information, which can't be obtained without a pointer > to the btf structure. > > So, l

[PATCH bpf-next 1/3] bpf: pass struct btf pointer to the map_check_btf() callback

2018-12-07 Thread Roman Gushchin
If key_type or value_type are of non-trivial data types (e.g. structure or typedef), it's not possible to check them without the additional information, which can't be obtained without a pointer to the btf structure. So, let's pass btf pointer to the map_check_btf() callbacks. Signed-off-by: Roma