]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap fix msg->sg.size account on ingress skb
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 13 May 2019 14:19:55 +0000 (07:19 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 13 May 2019 23:31:43 +0000 (01:31 +0200)
commitf7dafff13632fb880bc889bbae5174e02a42ffcd
treee258b4fb9bfab58874ce7af66f37af4e50f3d949
parentf14511b4ea32fde56392d9ed92a4fcdefb92cb8b
bpf: sockmap fix msg->sg.size account on ingress skb

When converting a skb to msg->sg we forget to set the size after the
latest ktls/tls code conversion. This patch can be reached by doing
a redir into ingress path from BPF skb sock recv hook. Then trying to
read the size fails.

Fix this by setting the size.

Fixes: 38506f4bbc9de ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/core/skmsg.c