[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DB7PR04MB42529ADA5780B2E7551329848B570@DB7PR04MB4252.eurprd04.prod.outlook.com>
Date: Sun, 22 Jul 2018 06:08:47 +0000
From: Vakul Garg <vakul.garg@....com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Query about tls patch
Hi
I got a query reading patch https://patchwork.ozlabs.org/patch/943442/ (already merged).
[PATCH]: tls: Fix zerocopy_from_iter iov handling
In tls_sw_sendmsg(), if zerocopy_from_iter() fails, we go to fallback_to_reg_send.
Here we first call iov_iter_revert(). But the iov_iter_advance didn't happen in first place.
Similarly, in zerocopy_from_iter(), if 'revert' is passed as 'true', iov_iter_revert() is called even if iov_iter_advance() never happened (case of error return).
In tls_sw_recvmsg() flow, the iov_iter_revert() is always triggered.
With revert happening, I am missing the point how the case where multiple records are decrypted into user space buffer with one invocation of 'recvmsg()' happens?
It seems that successively dequeued tls records would get decrypted at same location in the output buffer and keep overwriting the previous one.
Regards
Vakul
Powered by blists - more mailing lists