Skip to contentSkip to conversation

net: tls: fix async vs NIC crypto offload

PATCH Applied Jakub Kicinski 3 participants 3 messages Apr 25, 2022 – Apr 27, 2022

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 net: tls: fix async vs NIC crypto offload

When NIC takes care of crypto (or the record has already been decrypted) we forget to update darg->async. ->async is supposed to mean whether record is async capable on input and whether record has been queued for async crypto on output.

Fixes 3547a1f9d988 ("tls: rx: use async as an in-out argument")
---
 net/tls/tls_sw.c | 2 ++
 1 file changed, 2 insertions(+)
net/tls/tls_sw.c +2 -0
index ddbe05ec5489..80094528eadb 100644
@@ -1562,6 +1562,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
 
 	if (tlm->decrypted) {
 		darg->zc = false;
+		darg->async = false;
 		return 0;
 	}
 
@@ -1572,6 +1573,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
 		if (err > 0) {
 			tlm->decrypted = 1;
 			darg->zc = false;
+			darg->async = false;
 			goto decrypt_done;
 		}
 	}
Signature · 1 line
2.34.1
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jakub Kicinski

When NIC takes care of crypto (or the record has already been decrypted) we forget to update darg->async. ->async is supposed to mean whether record is async capable on input and whether record has been queued for async crypto on output.

Fixes 3547a1f9d988 ("tls: rx: use async as an in-out argument")

Thanks Jakub!

#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Mon, 25 Apr 2022 16:33:09 -0700 you wrote:

When NIC takes care of crypto (or the record has already been decrypted) we forget to update darg->async. ->async is supposed to mean whether record is async capable on input and whether record has been queued for async crypto on output.

Fixes 3547a1f9d988 ("tls: rx: use async as an in-out argument")

[...]

Here is the summary with links:
- [net-next] net: tls: fix async vs NIC crypto offload

    https://git.kernel.org/netdev/net-next/c/c706b2b5ed74

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html