]> git.hungrycats.org Git - linux/commit
Revert "tls: rx: move counting TlsDecryptErrors for sync"
authorGal Pressman <gal@nvidia.com>
Tue, 5 Jul 2022 11:08:37 +0000 (14:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:38:51 +0000 (14:38 +0000)
commitcc5e34bc5b205be568f07f7b964304abddc8b2d6
tree29ab06f935e3439d44a9f4da03e0b047ed36f87b
parent9d5932275b3b4a6ffc0be57b1810ad8cf80eafd7
Revert "tls: rx: move counting TlsDecryptErrors for sync"

commit a069a90554168ac4cc81af65f000557d2a8a0745 upstream.

This reverts commit 284b4d93daee56dff3e10029ddf2e03227f50dbf.
When using TLS device offload and coming from tls_device_reencrypt()
flow, -EBADMSG error in tls_do_decryption() should not be counted
towards the TLSTlsDecryptError counter.

Move the counter increase back to the decrypt_internal() call site in
decrypt_skb_update().
This also fixes an issue where:
if (n_sgin < 1)
return -EBADMSG;

Errors in decrypt_internal() were not counted after the cited patch.

Fixes: 284b4d93daee ("tls: rx: move counting TlsDecryptErrors for sync")
Cc: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tls/tls_sw.c