Re: [PATCH v2 bpf-next 03/14] bpf: Support bpf program calling kernel function

2021-03-26 Thread Alexei Starovoitov
On Wed, Mar 24, 2021 at 06:51:42PM -0700, Martin KaFai Lau wrote: > ref_tname = btf_name_by_offset(btf, ref_t->name_off); > - if (btf_get_prog_ctx_type(log, btf, t, env->prog->type, i)) { > + if (btf_is_kernel(btf)) { > + const struct btf_ty

Re: [PATCH v2 bpf-next 03/14] bpf: Support bpf program calling kernel function

2021-03-26 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On 3/26/21 3:11 AM, Toke Høiland-Jørgensen wrote: >> Martin KaFai Lau writes: >> >>> On Thu, Mar 25, 2021 at 11:02:23PM +0100, Toke Høiland-Jørgensen wrote: Martin KaFai Lau writes: > This patch adds support to BPF verifier to allow bpf program callin

Re: [PATCH v2 bpf-next 03/14] bpf: Support bpf program calling kernel function

2021-03-26 Thread Alexei Starovoitov
On 3/26/21 3:11 AM, Toke Høiland-Jørgensen wrote: Martin KaFai Lau writes: On Thu, Mar 25, 2021 at 11:02:23PM +0100, Toke Høiland-Jørgensen wrote: Martin KaFai Lau writes: This patch adds support to BPF verifier to allow bpf program calling kernel function directly. Hi Martin This is ex

Re: [PATCH v2 bpf-next 03/14] bpf: Support bpf program calling kernel function

2021-03-26 Thread Toke Høiland-Jørgensen
Martin KaFai Lau writes: > On Thu, Mar 25, 2021 at 11:02:23PM +0100, Toke Høiland-Jørgensen wrote: >> Martin KaFai Lau writes: >> >> > This patch adds support to BPF verifier to allow bpf program calling >> > kernel function directly. >> >> Hi Martin >> >> This is exciting stuff! :) >> >> Ju

Re: [PATCH v2 bpf-next 03/14] bpf: Support bpf program calling kernel function

2021-03-25 Thread Martin KaFai Lau
On Thu, Mar 25, 2021 at 11:02:23PM +0100, Toke Høiland-Jørgensen wrote: > Martin KaFai Lau writes: > > > This patch adds support to BPF verifier to allow bpf program calling > > kernel function directly. > > Hi Martin > > This is exciting stuff! :) > > Just one quick question about this: > >

Re: [PATCH v2 bpf-next 03/14] bpf: Support bpf program calling kernel function

2021-03-25 Thread Toke Høiland-Jørgensen
Martin KaFai Lau writes: > This patch adds support to BPF verifier to allow bpf program calling > kernel function directly. Hi Martin This is exciting stuff! :) Just one quick question about this: > [ For the future calling function-in-kernel-module support, an array > of module btf_fds can