Re: [PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 6:39 PM Alexei Starovoitov wrote: > > On 10/11/19 12:02 PM, Andrii Nakryiko wrote: > > On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > >> > >> /* type of values returned from helper functions */ > >> @@ -235,11 +236,17 @@ struct bpf_func_proto { > >>

Re: [PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 12:02 PM, Andrii Nakryiko wrote: > On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: >> >> /* type of values returned from helper functions */ >> @@ -235,11 +236,17 @@ struct bpf_func_proto { >> bool gpl_only; >> bool pkt_access; >> enum bpf_return_t

Re: [PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > > Introduce new helper that reuses existing skb perf_event output > implementation, but can be called from raw_tracepoint programs > that receive 'struct sk_buff *' as tracepoint argument or > can walk other kernel data structures to skb p

[PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-09 Thread Alexei Starovoitov
Introduce new helper that reuses existing skb perf_event output implementation, but can be called from raw_tracepoint programs that receive 'struct sk_buff *' as tracepoint argument or can walk other kernel data structures to skb pointer. In order to do that teach verifier to resolve true C types