android_kernel_motorola_sm6375/net/tls
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maxim Mikityanskiy c3e7ea5860 tls: Skip tls_append_frag on zero copy size
[ Upstream commit a0df71948e9548de819a6f1da68f5f1742258a52 ]

Calling tls_append_frag when max_open_record_len == record->len might
add an empty fragment to the TLS record if the call happens to be on the
page boundary. Normally tls_append_frag coalesces the zero-sized
fragment to the previous one, but not if it's on page boundary.

If a resync happens then, the mlx5 driver posts dump WQEs in
tx_post_resync_dump, and the empty fragment may become a data segment
with byte_count == 0, which will confuse the NIC and lead to a CQE
error.

This commit fixes the described issue by skipping tls_append_frag on
zero size to avoid adding empty fragments. The fix is not in the driver,
because an empty fragment is hardly the desired behavior.

Fixes: e8f6979981 ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2022-05-09 09:03:26 +02:00
..
Kconfig
Makefile
tls_device.c tls: Skip tls_append_frag on zero copy size 2022-05-09 09:03:26 +02:00
tls_device_fallback.c
tls_main.c
tls_sw.c net/tls: fix slab-out-of-bounds bug in decrypt_internal 2022-04-15 14:18:37 +02:00