Sabrina Dubroca 85eef9a41d tls: adjust recv return with async crypto and failed copy to userspace
process_rx_list may not copy as many bytes as we want to the userspace
buffer, for example in case we hit an EFAULT during the copy. If this
happens, we should only count the bytes that were actually copied,
which may be 0.

Subtracting async_copy_bytes is correct in both peek and !peek cases,
because decrypted == async_copy_bytes + peeked for the peek case: peek
is always !ZC, and we can go through either the sync or async path. In
the async case, we add chunk to both decrypted and
async_copy_bytes. In the sync case, we add chunk to both decrypted and
peeked. I missed that in commit 6caaf104423d ("tls: fix peeking with
sync+async decryption").

Fixes: 4d42cd6bc2ac ("tls: rx: fix return value for async crypto")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/1b5a1eaab3c088a9dd5d9f1059ceecd7afe888d1.1711120964.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-03-26 20:48:24 -07:00
2024-03-26 12:55:18 +01:00
2024-03-18 09:15:50 -07:00
2024-03-21 13:34:15 -07:00
2024-03-26 12:55:18 +01:00
2024-03-21 14:41:00 -07:00
2024-03-11 11:35:31 -07:00
2024-03-18 14:59:13 -07:00
2024-03-26 12:55:18 +01:00
2024-03-21 14:41:00 -07:00
2024-03-21 14:41:00 -07:00
2024-03-21 14:41:00 -07:00
2024-03-18 15:11:44 -07:00
2024-03-26 12:55:18 +01:00
2024-03-26 12:55:18 +01:00
2024-01-18 17:57:07 -08:00
2024-03-26 12:55:18 +01:00
2022-09-28 09:02:20 +02:00
2022-10-10 12:00:45 -07:00
2024-03-26 12:55:18 +01:00
2024-03-21 14:41:00 -07:00
2024-03-18 03:36:32 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 5.7 GiB
Languages
C 97.6%
Assembly 1%
Shell 0.5%
Python 0.3%
Makefile 0.3%