Re: [PATCHv3 bpf-next 04/12] bpf: Add PTR_TO_SOCKET verifier type

2018-10-02 Thread Joe Stringer
On Fri, 28 Sep 2018 at 06:38, Daniel Borkmann wrote: > > On 09/28/2018 01:26 AM, Joe Stringer wrote: > > Teach the verifier a little bit about a new type of pointer, a > > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > > 'struct bpf_sock' structure. > > > > Signed-off-by: Joe

Re: [PATCHv3 bpf-next 04/12] bpf: Add PTR_TO_SOCKET verifier type

2018-09-28 Thread Daniel Borkmann
On 09/28/2018 01:26 AM, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer [...] > +/* Return true if it's OK to have the same insn

Re: [PATCHv3 bpf-next 04/12] bpf: Add PTR_TO_SOCKET verifier type

2018-09-28 Thread Daniel Borkmann
On 09/28/2018 01:26 AM, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer [...] > diff --git a/net/core/filter.c

Re: [PATCHv3 bpf-next 04/12] bpf: Add PTR_TO_SOCKET verifier type

2018-09-28 Thread Daniel Borkmann
Hi Joe, On 09/28/2018 01:26 AM, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer [...] > } > @@ -1726,6 +1755,14 @@ static

Re: [PATCHv3 bpf-next 04/12] bpf: Add PTR_TO_SOCKET verifier type

2018-09-28 Thread Alexei Starovoitov
On Thu, Sep 27, 2018 at 04:26:51PM -0700, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov

[PATCHv3 bpf-next 04/12] bpf: Add PTR_TO_SOCKET verifier type

2018-09-27 Thread Joe Stringer
Teach the verifier a little bit about a new type of pointer, a PTR_TO_SOCKET. This pointer type is accessed from BPF through the 'struct bpf_sock' structure. Signed-off-by: Joe Stringer --- v2: Reuse reg_type_mismatch() in more places Reduce the number of passes at convert_ctx_access() v3: