Re: [bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-19 Thread John Fastabend
On 10/19/2018 03:57 PM, Daniel Borkmann wrote: > On 10/20/2018 12:51 AM, Daniel Borkmann wrote: >> On 10/18/2018 10:58 PM, John Fastabend wrote: >>> We check if the sk_user_data (the psock in skmsg) is in fact a sockmap >>> type to late, after we read the refcnt which is an error. This >>> series

Re: [bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-19 Thread Daniel Borkmann
On 10/20/2018 12:51 AM, Daniel Borkmann wrote: > On 10/18/2018 10:58 PM, John Fastabend wrote: >> We check if the sk_user_data (the psock in skmsg) is in fact a sockmap >> type to late, after we read the refcnt which is an error. This >> series moves the check up before reading refcnt and also

Re: [bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-19 Thread Daniel Borkmann
On 10/18/2018 10:58 PM, John Fastabend wrote: > We check if the sk_user_data (the psock in skmsg) is in fact a sockmap > type to late, after we read the refcnt which is an error. This > series moves the check up before reading refcnt and also adds a test > to test_maps to test trying to add a KCM

[bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-18 Thread John Fastabend
We check if the sk_user_data (the psock in skmsg) is in fact a sockmap type to late, after we read the refcnt which is an error. This series moves the check up before reading refcnt and also adds a test to test_maps to test trying to add a KCM socket into a sockmap. While reviewig this code I