]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
bpf: Sockmap/tls, push write_space updates through ulp updates
authorJohn Fastabend <john.fastabend@gmail.com>
Sat, 11 Jan 2020 06:12:01 +0000 (06:12 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit75993cfd71aa4a801d2b619a81236d89907f16fb
treea3244385862e1fc3aac7261fef2be4162802ca73
parentf40469c9aa69d7e8fb417b61529e146d12cc229a
bpf: Sockmap/tls, push write_space updates through ulp updates

BugLink: https://bugs.launchpad.net/bugs/1862429
commit 33bfe20dd7117dd81fd896a53f743a233e1ad64f upstream.

When sockmap sock with TLS enabled is removed we cleanup bpf/psock state
and call tcp_update_ulp() to push updates to TLS ULP on top. However, we
don't push the write_space callback up and instead simply overwrite the
op with the psock stored previous op. This may or may not be correct so
to ensure we don't overwrite the TLS write space hook pass this field to
the ULP and have it fixup the ctx.

This completes a previous fix that pushed the ops through to the ULP
but at the time missed doing this for write_space, presumably because
write_space TLS hook was added around the same time.

Fixes: 95fa145479fbc ("bpf: sockmap/tls, close can race with map free")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/bpf/20200111061206.8028-4-john.fastabend@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/skmsg.h
include/net/tcp.h
net/ipv4/tcp_ulp.c
net/tls/tls_main.c