Re: [PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-09 Thread Alexei Starovoitov
On 10/9/19 1:51 PM, Martin Lau wrote: >> err = btf_check_all_metas(env); >> +if (err) >> +goto errout; >> + > Considering btf_vmlinux is already safe, any concern in making an extra > call to btf_check_all_types()? Only concern is additional memory resolved_* arrays will take. The

Re: [PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-09 Thread Martin Lau
On Fri, Oct 04, 2019 at 10:03:07PM -0700, Alexei Starovoitov wrote: > If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' > for further use by the verifier. > In-kernel BTF is trusted just like kallsyms and other build artifacts > embedded into vmlinux. > Yet run this BTF image t

Re: [PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-06 Thread Andrii Nakryiko
On Sun, Oct 6, 2019 at 4:49 PM Alexei Starovoitov wrote: > > On Sat, Oct 05, 2019 at 11:36:16PM -0700, Andrii Nakryiko wrote: > > On Fri, Oct 4, 2019 at 10:08 PM Alexei Starovoitov wrote: > > > > > > If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' > > > for further use by t

Re: [PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-06 Thread Alexei Starovoitov
On Sat, Oct 05, 2019 at 11:36:16PM -0700, Andrii Nakryiko wrote: > On Fri, Oct 4, 2019 at 10:08 PM Alexei Starovoitov wrote: > > > > If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' > > for further use by the verifier. > > In-kernel BTF is trusted just like kallsyms and other

Re: [PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-05 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 10:08 PM Alexei Starovoitov wrote: > > If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' > for further use by the verifier. > In-kernel BTF is trusted just like kallsyms and other build artifacts > embedded into vmlinux. > Yet run this BTF image through

[PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-04 Thread Alexei Starovoitov
If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' for further use by the verifier. In-kernel BTF is trusted just like kallsyms and other build artifacts embedded into vmlinux. Yet run this BTF image through BTF verifier to make sure that it is valid and it wasn't mangled during