From: sashiko-bot@kernel.org
To: "Rani Hod" <rani.hod@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Herbert Xu" <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: tcrypt - restore request length in multi-update ahash speed tests
Date: Sat, 05 Dec 2026 15:08:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-251676@kernel.org> (raw)
In-Reply-To: <20261205-tcrypt-ahash-nbytes-v1-1-6ab5355c2ba0@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] crypto: tcrypt: non-standard Co-authored-by trailer in commit
message
--
commit 6e380fecad3b52fc13d296cb479c4a08d5ee0df9
Author: Rani Hod <rani.hod@gmail.com>
> crypto: tcrypt - restore request length in multi-update ahash speed tests
>
> Since commit 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in
> API"), crypto_ahash_final() is an inline wrapper that sets req->nbytes
> to zero and calls crypto_ahash_finup().
>
> test_ahash_speed_common() sets the request length once with
> ahash_request_set_crypt(), and test_ahash_jiffies() and
> test_ahash_cycles() then run several init/update/final rounds on that
> request. The final() at the end of the first round clears req->nbytes,
> so every update() in later rounds hashes zero bytes. The results are
> still reported as if blen bytes had been hashed in each round, which
> inflates the multi-update figures (plen < blen) by up to two orders of
> magnitude. The single-update cases (plen == blen) go through
> crypto_ahash_digest() and are not affected.
>
> For example, sha256-lib under QEMU (x86_64, TCG), "tcrypt.mode=404
> tcrypt.sec=1", in bytes/sec:
>
> test block per update before after
> 15 4096 1024 1652248576 46739456
> 16 4096 4096 49266688 52375552
> 20 8192 4096 3241795584 52166656
> 21 8192 8192 45522944 54394880
>
> Tests 16 and 21 are single-update cases and serve as a baseline.
>
> The cycles mode (tcrypt.sec=0) shows the same: test 15 went from
> 1 cycle/byte to 92 cycles/byte, against 106 cycles/byte for test 16.
>
> Restore the request length at the start of every round. In
> test_ahash_cycles() this is done before get_cycles(), so it is not
> counted in the measurement.
>
> The problem was found while testing an out-of-tree hash driver. A
> counter in the driver showed that a whole tcrypt run issued only as
> many update requests to the hardware as the first round needs. The
> analysis, the fix and this changelog were prepared with the help of an
> AI coding assistant (Claude Opus 5.5) and reviewed by the submitter.
>
> Fixes: 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in API")
> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
> Signed-off-by: Rani Hod <rani.hod@gmail.com>
[Severity: Low]
Should the Co-authored-by: trailer be dropped?
scripts/checkpatch.pl warns that Co-authored-by: is a non-standard signature.
Kernel co-authorship uses Co-developed-by:, which requires a matching
Signed-off-by: to certify the Developer Certificate of Origin, and per
Documentation/process/coding-assistants.rst AI agents must not add one.
Since AI assistance is already disclosed in the changelog body, removing this
trailer avoids the checkpatch warning.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-tcrypt-ahash-nbytes-v1-1-6ab5355c2ba0@gmail.com?part=1
prev parent reply other threads:[~2026-12-05 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 14:54 [PATCH] crypto: tcrypt - restore request length in multi-update ahash speed tests Rani Hod via B4 Relay
2026-12-05 15:08 ` sashiko-bot [this message]
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=sashiko-outbox-251676@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=rani.hod@gmail.com \
--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