Re: [bpf PATCH 0/4] sockhash/sockmap fixes

2018-07-05 Thread John Fastabend
On 07/05/2018 08:36 AM, John Fastabend wrote:
> First three patches resolve issues found while testing sockhash and
> reviewing code. Syzbot also found them about the same time as I was
> working on fixes. The main issue is in the sockhash path we reduced
> the scope of sk_callback lock but this meant we could get update and
> close running in parallel so fix that here.

[...]

> ---
> 
> John Fastabend (4):
>   bpf: fix sk_skb programs without skb->dev assigned
>   bpf: sockhash, disallow bpf_tcp_close and update in parallel
>   bpf: sockmap, consume_skb in close path
>   bpf: sockmap, convert bpf_compute_data_pointers to bpf_*_sk_skb
> 
> 
>  0 files changed
^^^

Ah dang, something about my workflow causes git to report 0 files
changed occasionally, I forgot to check it before sending. I'll send
a v2. And get some more coffee I guess. Thanks sorry for the noise.


[bpf PATCH 0/4] sockhash/sockmap fixes

2018-07-05 Thread John Fastabend
First three patches resolve issues found while testing sockhash and
reviewing code. Syzbot also found them about the same time as I was
working on fixes. The main issue is in the sockhash path we reduced
the scope of sk_callback lock but this meant we could get update and
close running in parallel so fix that here.

Then testing sk_msg and sk_skb programs together found that skb->dev
is not always assigned and some of the helpers were depending on this
to lookup max mtu. Fix this by using SKB_MAX_ALLOC when no MTU is
available.

Finally, Martin spotted that the sockmap code was still using the
qdisc skb cb structure. But I was sure we had fixed this long ago.
Looks like we missed it in a merge conflict resolution and then by
chance data_end offset was the same in both structures so everything
sort of continued to work even though it could break at any moment
if the structs ever change. So redo the conversion and this time
also convert the helpers.

---

John Fastabend (4):
  bpf: fix sk_skb programs without skb->dev assigned
  bpf: sockhash, disallow bpf_tcp_close and update in parallel
  bpf: sockmap, consume_skb in close path
  bpf: sockmap, convert bpf_compute_data_pointers to bpf_*_sk_skb


 0 files changed

--
Signature