[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB7PR04MB4252A90E10E2F7A05FDF43B08B7B0@DB7PR04MB4252.eurprd04.prod.outlook.com>
Date: Tue, 26 Feb 2019 15:01:17 +0000
From: Vakul Garg <vakul.garg@....com>
To: Boris Pismenny <borisp@...lanox.com>,
"aviadye@...lanox.com" <aviadye@...lanox.com>,
"davejwatson@...com" <davejwatson@...com>,
"john.fastabend@...il.com" <john.fastabend@...il.com>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "eranbe@...lanox.com" <eranbe@...lanox.com>
Subject: RE: [PATCH net 4/4] tls: Fix tls_device receive
> -----Original Message-----
> From: Boris Pismenny <borisp@...lanox.com>
> Sent: Tuesday, February 26, 2019 5:43 PM
> To: aviadye@...lanox.com; davejwatson@...com;
> john.fastabend@...il.com; daniel@...earbox.net; Vakul Garg
> <vakul.garg@....com>; netdev@...r.kernel.org
> Cc: eranbe@...lanox.com; borisp@...lanox.com
> Subject: [PATCH net 4/4] tls: Fix tls_device receive
>
> Currently, the receive function fails to handle records already decrypted by
> the device due to the commit mentioned below.
>
> This commit advances the TLS record sequence number and prepares the
> context to handle the next record.
>
> Fixes: fedf201e1296 ("net: tls: Refactor control message handling on recv")
> Signed-off-by: Boris Pismenny <borisp@...lanox.com>
> Reviewed-by: Eran Ben Elisha <eranbe@...lanox.com>
> ---
> net/tls/tls_sw.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index
> f515cd7e984e..85da10182d8d 100644
> --- a/net/tls/tls_sw.c
> +++ b/net/tls/tls_sw.c
> @@ -1481,18 +1481,17 @@ static int decrypt_skb_update(struct sock *sk,
> struct sk_buff *skb,
>
> return err;
> }
> -
> - rxm->full_len -= padding_length(ctx, tls_ctx, skb);
> -
> - rxm->offset += prot->prepend_size;
> - rxm->full_len -= prot->overhead_size;
> - tls_advance_record_sn(sk, &tls_ctx->rx, version);
> - ctx->decrypted = true;
> - ctx->saved_data_ready(sk);
> } else {
> *zc = false;
> }
>
> + rxm->full_len -= padding_length(ctx, tls_ctx, skb);
> + rxm->offset += prot->prepend_size;
> + rxm->full_len -= prot->overhead_size;
> + tls_advance_record_sn(sk, &tls_ctx->rx, version);
> + ctx->decrypted = true;
> + ctx->saved_data_ready(sk);
> +
> return err;
> }
>
> --
> 2.12.2
Reviewed-by: Vakul Garg <vakul.garg@....com>
Powered by blists - more mailing lists