* [PATCH net-next 0/3] chtls: fix inline tls bugs
@ 2020-07-13 18:35 Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 1/3] crypto/chtls: correct net_device reference count Vinay Kumar Yadav
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-07-13 18:35 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: secdev, Vinay Kumar Yadav
This series of patches fix following issues.
patch1: correct net_device reference count
patch2: fix tls alert messages corruption
patch3: Enable tcp window scaling option
Vinay Kumar Yadav (3):
crypto/chtls: correct net_device reference count
crypto/chtls: fix tls alert messages corrupted by tls data
crypto/chtls: Enable tcp window scaling option
drivers/crypto/chelsio/chtls/chtls_cm.c | 6 ++++++
drivers/crypto/chelsio/chtls/chtls_io.c | 7 ++++---
2 files changed, 10 insertions(+), 3 deletions(-)
--
2.18.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/3] crypto/chtls: correct net_device reference count
2020-07-13 18:35 [PATCH net-next 0/3] chtls: fix inline tls bugs Vinay Kumar Yadav
@ 2020-07-13 18:35 ` Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 2/3] crypto/chtls: fix tls alert messages Vinay Kumar Yadav
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-07-13 18:35 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: secdev, Vinay Kumar Yadav
Release net_device reference hold by ip_dev_find().
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
---
drivers/crypto/chelsio/chtls/chtls_cm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c b/drivers/crypto/chelsio/chtls/chtls_cm.c
index f200fae6f..eedad8caa 100644
--- a/drivers/crypto/chelsio/chtls/chtls_cm.c
+++ b/drivers/crypto/chelsio/chtls/chtls_cm.c
@@ -95,6 +95,7 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
struct net_device *ndev = cdev->ports[0];
#if IS_ENABLED(CONFIG_IPV6)
struct net_device *temp;
+ bool put = false;
int addr_type;
#endif
@@ -103,6 +104,7 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
if (likely(!inet_sk(sk)->inet_rcv_saddr))
return ndev;
ndev = ip_dev_find(&init_net, inet_sk(sk)->inet_rcv_saddr);
+ put = true;
break;
#if IS_ENABLED(CONFIG_IPV6)
case PF_INET6:
@@ -126,6 +128,9 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
if (!ndev)
return NULL;
+ if (put)
+ dev_put(ndev);
+
if (is_vlan_dev(ndev))
return vlan_dev_real_dev(ndev);
return ndev;
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/3] crypto/chtls: fix tls alert messages
2020-07-13 18:35 [PATCH net-next 0/3] chtls: fix inline tls bugs Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 1/3] crypto/chtls: correct net_device reference count Vinay Kumar Yadav
@ 2020-07-13 18:35 ` Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 3/3] crypto/chtls: Enable tcp window scaling option Vinay Kumar Yadav
2020-07-13 22:51 ` [PATCH net-next 0/3] chtls: fix inline tls bugs Jakub Kicinski
3 siblings, 0 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-07-13 18:35 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: secdev, Vinay Kumar Yadav
When tls data skb is pending for Tx and tls alert comes , It
is wrongly overwrite the record type of tls data to tls alert
record type. fix the issue correcting it.
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
---
drivers/crypto/chelsio/chtls/chtls_io.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/drivers/crypto/chelsio/chtls/chtls_io.c
index e1401d9cc..2e9acae1c 100644
--- a/drivers/crypto/chelsio/chtls/chtls_io.c
+++ b/drivers/crypto/chelsio/chtls/chtls_io.c
@@ -1052,14 +1052,15 @@ int chtls_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
&record_type);
if (err)
goto out_err;
+
+ /* Avoid appending tls handshake, alert to tls data */
+ if (skb)
+ tx_skb_finalize(skb);
}
recordsz = size;
csk->tlshws.txleft = recordsz;
csk->tlshws.type = record_type;
-
- if (skb)
- ULP_SKB_CB(skb)->ulp.tls.type = record_type;
}
if (!skb || (ULP_SKB_CB(skb)->flags & ULPCB_FLAG_NO_APPEND) ||
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 3/3] crypto/chtls: Enable tcp window scaling option
2020-07-13 18:35 [PATCH net-next 0/3] chtls: fix inline tls bugs Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 1/3] crypto/chtls: correct net_device reference count Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 2/3] crypto/chtls: fix tls alert messages Vinay Kumar Yadav
@ 2020-07-13 18:35 ` Vinay Kumar Yadav
2020-07-13 22:51 ` [PATCH net-next 0/3] chtls: fix inline tls bugs Jakub Kicinski
3 siblings, 0 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-07-13 18:35 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: secdev, Vinay Kumar Yadav
Enable tcp window scaling option in hw based on sysctl settings.
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
---
drivers/crypto/chelsio/chtls/chtls_cm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c b/drivers/crypto/chelsio/chtls/chtls_cm.c
index eedad8caa..9d6ea812b 100644
--- a/drivers/crypto/chelsio/chtls/chtls_cm.c
+++ b/drivers/crypto/chelsio/chtls/chtls_cm.c
@@ -1061,6 +1061,7 @@ static void chtls_pass_accept_rpl(struct sk_buff *skb,
opt2 |= CONG_CNTRL_V(CONG_ALG_NEWRENO);
opt2 |= T5_ISS_F;
opt2 |= T5_OPT_2_VALID_F;
+ opt2 |= WND_SCALE_EN_V(!!(sock_net(sk)->ipv4.sysctl_tcp_window_scaling));
rpl5->opt0 = cpu_to_be64(opt0);
rpl5->opt2 = cpu_to_be32(opt2);
rpl5->iss = cpu_to_be32((prandom_u32() & ~7UL) - 1);
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/3] chtls: fix inline tls bugs
2020-07-13 18:35 [PATCH net-next 0/3] chtls: fix inline tls bugs Vinay Kumar Yadav
` (2 preceding siblings ...)
2020-07-13 18:35 ` [PATCH net-next 3/3] crypto/chtls: Enable tcp window scaling option Vinay Kumar Yadav
@ 2020-07-13 22:51 ` Jakub Kicinski
3 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2020-07-13 22:51 UTC (permalink / raw)
To: Vinay Kumar Yadav; +Cc: netdev, davem, secdev
On Tue, 14 Jul 2020 00:05:51 +0530 Vinay Kumar Yadav wrote:
> This series of patches fix following issues.
> patch1: correct net_device reference count
> patch2: fix tls alert messages corruption
IMO fixes to the tls are fine, they should have a Fixes tag and go to
net, not net-next.
> patch3: Enable tcp window scaling option
But extending your TOE I don't like.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-13 22:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 18:35 [PATCH net-next 0/3] chtls: fix inline tls bugs Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 1/3] crypto/chtls: correct net_device reference count Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 2/3] crypto/chtls: fix tls alert messages Vinay Kumar Yadav
2020-07-13 18:35 ` [PATCH net-next 3/3] crypto/chtls: Enable tcp window scaling option Vinay Kumar Yadav
2020-07-13 22:51 ` [PATCH net-next 0/3] chtls: fix inline tls bugs Jakub Kicinski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.