linux-stable/include
Daniel Borkmann d829e9c411 tls: convert to generic sk_msg interface
Convert kTLS over to make use of sk_msg interface for plaintext and
encrypted scattergather data, so it reuses all the sk_msg helpers
and data structure which later on in a second step enables to glue
this to BPF.

This also allows to remove quite a bit of open coded helpers which
are covered by the sk_msg API. Recent changes in kTLs 80ece6a03a
("tls: Remove redundant vars from tls record structure") and
4e6d47206c ("tls: Add support for inplace records encryption")
changed the data path handling a bit; while we've kept the latter
optimization intact, we had to undo the former change to better
fit the sk_msg model, hence the sg_aead_in and sg_aead_out have
been brought back and are linked into the sk_msg sgs. Now the kTLS
record contains a msg_plaintext and msg_encrypted sk_msg each.

In the original code, the zerocopy_from_iter() has been used out
of TX but also RX path. For the strparser skb-based RX path,
we've left the zerocopy_from_iter() in decrypt_internal() mostly
untouched, meaning it has been moved into tls_setup_from_iter()
with charging logic removed (as not used from RX). Given RX path
is not based on sk_msg objects, we haven't pursued setting up a
dummy sk_msg to call into sk_msg_zerocopy_from_iter(), but it
could be an option to prusue in a later step.

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
..
acpi ACPICA: Update version to 20180810 2018-08-14 23:49:13 +02:00
asm-generic asm-generic: io: Fix ioport_map() for !CONFIG_GENERIC_IOMAP && CONFIG_INDIRECT_PIO 2018-09-14 09:49:21 +01:00
clocksource
crypto
drm drm/cma-helper: Fix crash in fbdev error path 2018-10-02 13:03:34 +02:00
dt-bindings dt-bindings: net: vsc8531: add two additional LED modes for VSC8584 2018-10-08 10:31:27 -07:00
keys
kvm
linux tls: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
math-emu
media media: v4l: event: Prevent freeing event subscriptions while accessed 2018-10-03 06:32:51 -04:00
memory
misc
net tls: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
pcmcia pcmcia: remove long deprecated pcmcia_request_exclusive_irq() function 2018-08-18 12:30:42 -07:00
ras
rdma Second merge window update 2018-08-23 15:34:48 -07:00
scsi SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
soc net: mscc: ocelot: simplify register access for PLL5 configuration 2018-10-05 14:36:44 -07:00
sound ASoC: Fixes for v4.19 2018-09-17 18:59:21 +02:00
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-06 14:43:42 -07:00
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-10-08 23:42:44 -07:00
video fbdev changes for v4.19: 2018-08-23 15:44:58 -07:00
xen xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00