From: sashiko-bot@kernel.org
To: "Demi Marie Obenour via B4 Relay"
<devnull+demiobenour.gmail.com@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 3/3] AF_ALG: Document that it is *always* slower
Date: Sat, 30 May 2026 00:47:19 +0000 [thread overview]
Message-ID: <20260530004720.1BCD91F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260523-af-alg-harden-v1-3-c76755c3a5c5@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The updated documentation incorrectly claims that AF_ALG no longer supports zero-copy and is always slower than userspace implementations.
--
commit f8743e2c044cc9e325ac113d7556afdf2c4c58d9
Author: Demi Marie Obenour <demiobenour@gmail.com>
AF_ALG: Document that it is *always* slower
This commit updates the userspace interface documentation to assert that
AF_ALG is always slower than software cryptography. It modifies the text
to state that zero-copy support has been completely removed from AF_ALG.
> diff --git a/Documentation/crypto/userspace-if.rst b/Documentation/crypto/userspace-if.rst
> index b31117d4415dd..ab93300c8e045 100644
> --- a/Documentation/crypto/userspace-if.rst
> +++ b/Documentation/crypto/userspace-if.rst
[ ... ]
> +Nowadays, AF_ALG no longer supports zero-copy or off-CPU accelerators.
> +Therefore, it is *always* slower than an optimized userspace implementation,
> +even for large messages. The only possible advantage left is that it avoids
[Severity: Medium]
Is this statement entirely accurate? While zero-copy was removed from aead and
skcipher, it appears to still be supported and functional for AF_ALG hash
algorithms in crypto/algif_hash.c via extract_iter_to_sg().
Because of this, using splice() with AF_ALG for hashing large files can avoid
user-space memory copies and still outperform userspace implementations. Does
this documentation need to be updated to reflect the remaining zero-copy hash
support?
> +duplicating code between kernel and userspace. However, userspace
> +implementations, especially hardware-accelerated ones, do not need to be large.
> +Just because OpenSSL is huge does not mean that all userspace cryptography
> +libraries are.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260523-af-alg-harden-v1-0-c76755c3a5c5@gmail.com?part=3
next prev parent reply other threads:[~2026-05-30 0:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 19:43 [PATCH 0/3] AF_ALG: Remove support for AIO and old-style drivers Demi Marie Obenour via B4 Relay
2026-05-23 19:43 ` [PATCH 1/3] net: Remove support for AIO on sockets Demi Marie Obenour via B4 Relay
2026-05-25 8:03 ` Christoph Hellwig
2026-05-26 15:58 ` Jens Axboe
2026-05-27 8:13 ` Christoph Hellwig
2026-05-28 16:56 ` Jens Axboe
2026-05-29 13:59 ` Christoph Hellwig
2026-05-27 1:40 ` Jakub Kicinski
2026-05-30 0:47 ` sashiko-bot
2026-05-23 19:43 ` [PATCH 2/3] AF_ALG: Drop support for off-CPU cryptography Demi Marie Obenour via B4 Relay
2026-05-30 0:47 ` sashiko-bot
2026-05-23 19:43 ` [PATCH 3/3] AF_ALG: Document that it is *always* slower Demi Marie Obenour via B4 Relay
2026-05-30 0:47 ` sashiko-bot [this message]
2026-05-29 6:09 ` [PATCH 0/3] AF_ALG: Remove support for AIO and old-style drivers Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260530004720.1BCD91F00899@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+demiobenour.gmail.com@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox