alistair23-linux/net
Daniel Borkmann 604326b41a bpf, sockmap: convert to generic sk_msg interface
Add a generic sk_msg layer, and convert current sockmap and later
kTLS over to make use of it. While sk_buff handles network packet
representation from netdevice up to socket, sk_msg handles data
representation from application to socket layer.

This means that sk_msg framework spans across ULP users in the
kernel, and enables features such as introspection or filtering
of data with the help of BPF programs that operate on this data
structure.

Latter becomes in particular useful for kTLS where data encryption
is deferred into the kernel, and as such enabling the kernel to
perform L7 introspection and policy based on BPF for TLS connections
where the record is being encrypted after BPF has run and came to
a verdict. In order to get there, first step is to transform open
coding of scatter-gather list handling into a common core framework
that subsystems can use.

The code itself has been split and refactored into three bigger
pieces: i) the generic sk_msg API which deals with managing the
scatter gather ring, providing helpers for walking and mangling,
transferring application data from user space into it, and preparing
it for BPF pre/post-processing, ii) the plain sock map itself
where sockets can be attached to or detached from; these bits
are independent of i) which can now be used also without sock
map, and iii) the integration with plain TCP as one protocol
to be used for processing L7 application data (later this could
e.g. also be extended to other protocols like UDP). The semantics
are the same with the old sock map code and therefore no change
of user facing behavior or APIs. While pursuing this work it
also helped finding a number of bugs in the old sockmap code
that we've fixed already in earlier commits. The test_sockmap
kselftest suite passes through fine as well.

Joint work with John.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-15 12:23:19 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-03 21:00:17 -07:00
bpf bpf: extend cgroup bpf core to allow multiple cgroup storage types 2018-10-01 16:18:32 +02:00
bpfilter net: bpfilter: Fix type cast and pointer warnings 2018-10-05 11:51:06 -07:00
bridge net/bridge: Update br_mdb_dump for strict data checking 2018-10-08 10:39:05 -07:00
caif net: caif: remove redundant null check on frontpkt 2018-09-17 18:49:57 -07:00
can
ceph
core bpf, sockmap: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
dcb
dccp inet: make sure to grab rcu_read_lock before using ireq->ireq_opt 2018-10-02 15:52:12 -07:00
decnet decnet: Remove unnecessary check for dev->name 2018-09-21 19:48:36 -07:00
dns_resolver dns: Allow the dns resolver to retrieve a server set 2018-10-04 09:40:52 -07:00
dsa net: dsa: remove redundant null pointer check before put_device 2018-09-17 08:20:11 -07:00
ethernet
hsr
ieee802154 net/ipfrag: let ip[6]frag_high_thresh in ns be higher than in init_net 2018-09-21 19:45:52 -07:00
ife
ipv4 bpf, sockmap: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2018-10-08 21:28:55 -07:00
iucv net/af_iucv: locate IUCV header via skb_network_header() 2018-09-26 09:56:07 -07:00
kcm Revert "kcm: remove any offset before parsing messages" 2018-09-17 18:43:42 -07:00
key
l2tp
l3mdev
lapb
llc llc: avoid blocking in llc_sap_close() 2018-09-13 09:04:58 -07:00
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-06 14:43:42 -07:00
mac802154
mpls net: Update netconf dump handlers for strict data checking 2018-10-08 10:39:05 -07:00
ncsi net/ncsi: Add NCSI OEM command support 2018-10-05 14:54:47 -07:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2018-10-08 21:28:55 -07:00
netlabel netlabel: check for IPV4MASK in addrinfo_get 2018-09-21 18:58:34 -07:00
netlink netlink: Add new socket option to enable strict checking on dumps 2018-10-08 10:39:04 -07:00
netrom
nfc Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
nsh
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2018-10-08 21:28:55 -07:00
packet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-06 14:43:42 -07:00
phonet
psample
qrtr
rds Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
rfkill
rose
rxrpc rxrpc: Allow the reply time to be obtained on a client call 2018-10-04 09:54:29 +01:00
sched net: Add extack to nlmsg_parse 2018-10-08 10:39:04 -07:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-03 21:00:17 -07:00
smc smc: generic netlink family should be __ro_after_init 2018-09-20 07:49:55 -07:00
strparser bpf, sockmap: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
sunrpc
switchdev
tipc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-03 21:00:17 -07:00
tls tls: Add support for inplace records encryption 2018-10-02 23:03:47 -07:00
unix
vmw_vsock
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-06 14:43:42 -07:00
x25
xdp xsk: proper AF_XDP socket teardown ordering 2018-10-08 10:09:22 +02:00
xfrm net: Add extack to nlmsg_parse 2018-10-08 10:39:04 -07:00
compat.c
Kconfig bpf, sockmap: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
Makefile
socket.c socket: Tighten no-error check in bind() 2018-10-05 14:34:45 -07:00
sysctl_net.c