tls: rx: strp: force mixed decrypted records into copy mode
authorJakub Kicinski <kuba@kernel.org>
Wed, 17 May 2023 01:50:38 +0000 (18:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 May 2023 07:37:37 +0000 (08:37 +0100)
commit14c4be92ebb3e36e392aa9dd8f314038a9f96f3c
tree15ee013099de677dc369f6e99dcb4b3dd8b28a38
parent210620ae44a83f25220450bbfcc22e6fe986b25f
tls: rx: strp: force mixed decrypted records into copy mode

If a record is partially decrypted we'll have to CoW it, anyway,
so go into copy mode and allocate a writable skb right away.

This will make subsequent fix simpler because we won't have to
teach tls_strp_msg_make_copy() how to copy skbs while preserving
decrypt status.

Tested-by: Shai Amiram <samiram@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/tls/tls_strp.c