[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181013004603.3747-1-daniel@iogearbox.net>
Date: Sat, 13 Oct 2018 02:45:55 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: alexei.starovoitov@...il.com
Cc: john.fastabend@...il.com, davejwatson@...com,
netdev@...r.kernel.org, Daniel Borkmann <daniel@...earbox.net>
Subject: [PATCH bpf-next v2 0/8] sockmap integration for ktls
This work adds a generic sk_msg layer and converts both sockmap
and later ktls over to make use of it as a common data structure
for application data (similarly as sk_buff for network packets).
With that in place the sk_msg framework spans accross ULP layer
in the kernel and allows for introspection or filtering of L7
data with the help of BPF programs operating on a common input
context.
In a second step, we enable the latter for ktls which was previously
not possible, meaning, ktls and sk_msg verdict programs were
mutually exclusive in the ULP layer which created challenges for
the orchestrator when trying to apply TCP based policy, for
example. Leveraging the prior consolidation we can finally overcome
this limitation.
Note, there's no change in behavior when ktls is not used in
combination with BPF, and also no change in behavior for stand
alone sockmap. The kselftest suites for ktls, sockmap and ktls
with sockmap combined also runs through successfully. For further
details please see individual patches.
Thanks!
v1 -> v2:
- Removed leftover comment spotted by Alexei
- Improved commit messages, rebase
Daniel Borkmann (5):
tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup
tcp, ulp: remove ulp bits from sockmap
bpf, sockmap: convert to generic sk_msg interface
tls: convert to generic sk_msg interface
bpf, doc: add maintainers entry to related files
John Fastabend (3):
tls: replace poll implementation with read hook
tls: add bpf support to sk_msg handling
bpf: add tls support for testing in test_sockmap
MAINTAINERS | 10 +
include/linux/bpf.h | 33 +-
include/linux/bpf_types.h | 2 +-
include/linux/filter.h | 21 -
include/linux/skmsg.h | 410 +++++
include/net/sock.h | 4 -
include/net/tcp.h | 28 +-
include/net/tls.h | 24 +-
kernel/bpf/Makefile | 5 -
kernel/bpf/core.c | 2 -
kernel/bpf/sockmap.c | 2629 ----------------------------
kernel/bpf/syscall.c | 6 +-
net/Kconfig | 11 +
net/core/Makefile | 2 +
net/core/filter.c | 270 +--
net/core/skmsg.c | 802 +++++++++
net/core/sock.c | 61 -
net/core/sock_map.c | 1002 +++++++++++
net/ipv4/Makefile | 1 +
net/ipv4/tcp_bpf.c | 655 +++++++
net/ipv4/tcp_ulp.c | 73 +-
net/strparser/Kconfig | 4 +-
net/tls/Kconfig | 1 +
net/tls/tls_device.c | 2 +-
net/tls/tls_main.c | 11 +-
net/tls/tls_sw.c | 900 ++++++----
tools/testing/selftests/bpf/test_sockmap.c | 89 +
27 files changed, 3666 insertions(+), 3392 deletions(-)
create mode 100644 include/linux/skmsg.h
delete mode 100644 kernel/bpf/sockmap.c
create mode 100644 net/core/skmsg.c
create mode 100644 net/core/sock_map.c
create mode 100644 net/ipv4/tcp_bpf.c
--
2.9.5
Powered by blists - more mailing lists