kernel_optimize_test/net/tls
Vakul Garg 692d7b5d1f tls: Fix recvmsg() to be able to peek across multiple records
This fixes recvmsg() to be able to peek across multiple tls records.
Without this patch, the tls's selftests test case
'recv_peek_large_buf_mult_recs' fails. Each tls receive context now
maintains a 'rx_list' to retain incoming skb carrying tls records. If a
tls record needs to be retained e.g. for peek case or for the case when
the buffer passed to recvmsg() has a length smaller than decrypted
record length, then it is added to 'rx_list'. Additionally, records are
added in 'rx_list' if the crypto operation runs in async mode. The
records are dequeued from 'rx_list' after the decrypted data is consumed
by copying into the buffer passed to recvmsg(). In case, the MSG_PEEK
flag is used in recvmsg(), then records are not consumed or removed
from the 'rx_list'.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-17 14:20:40 -08:00
..
Kconfig tls: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
Makefile
tls_device_fallback.c tls: zero the crypto information from tls_context before freeing 2018-09-13 12:03:47 -07:00
tls_device.c iov_iter: Separate type from direction and use accessor functions 2018-10-24 00:41:07 +01:00
tls_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-12-20 17:31:36 -08:00
tls_sw.c tls: Fix recvmsg() to be able to peek across multiple records 2019-01-17 14:20:40 -08:00