From: "Paul Louvel" <paul.louvel@bootlin.com>
To: "Herbert Xu" <herbert@gondor.apana.org.au>,
"Paul Louvel" <paul.louvel@bootlin.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Herve Codina" <herve.codina@bootlin.com>,
"Christophe Leroy" <chleroy@kernel.org>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 00/19] crypto: talitos - Driver cleanup
Date: Thu, 30 Jul 2026 12:00:38 +0200 [thread overview]
Message-ID: <DKBTH7CXUX2R.S62IGDGU9MJZ@bootlin.com> (raw)
In-Reply-To: <amr62AUAifNXVIns@gondor.apana.org.au>
Hi Herbert,
On Thu Jul 30, 2026 at 9:18 AM CEST, Herbert Xu wrote:
> On Wed, Jul 22, 2026 at 10:53:44AM +0200, Paul Louvel wrote:
>>
>> Changes in v4:
>> - The modification I did in v3 in PATCH 1 was incomplete. message_size
>> was not initialized in ahash_init(), and not incremented in
>> ahash_process_req().
>> - Link to v3: https://patch.msgid.link/20260721-7-1-rc1_talitos_cleanup-v3-0-7c71a2b77c83@bootlin.com
>
> Please check the Sashiko comments:
>
> https://sashiko.dev/#/patchset/20260722-7-1-rc1_talitos_cleanup-v4-0-81d1ed2ad911%40bootlin.com
>
> Thanks,
Thanks for notifying, I tend to forget to check it if they are not automatically
send in my mailbox.
On the following remarks:
> Also regarding -EAGAIN, if talitos_submit() returns -EAGAIN to the generic
> core, does the core handle it safely?
> Since we are now relying on CRYPTO_AHASH_ALG_BLOCK_ONLY, the generic core
> handles negative errors in ahash_update_finish(). If it sees an error like
> -EAGAIN, it clears the internal buffer length.
> Will this erase previously buffered partial blocks and silently corrupt the
> hash stream under high load?
This is a non-issue, because such error make the core abandon the current
request, right ?
> MD5 mandates little-endian padding length, and HMAC also requires the inner
> iPad length to be handled. Will this cause incorrect hash digests for
> messages whose length is an exact multiple of the block size?
Agreeing on MD5, and indeed with MD5 hash digests for message whose length is an
exact multiple of the block size, the hash is wrong.
The comment on HMAC seems wrong to me. The hardware performs IPAD and OPAD
operations automatically on the key data when required.
After some testing, I also don't found any obvious issue.
--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-07-30 10:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260722-7-1-rc1_talitos_cleanup-v4-0-81d1ed2ad911@bootlin.com>
2026-07-30 7:18 ` [PATCH v4 00/19] crypto: talitos - Driver cleanup Herbert Xu
2026-07-30 10:00 ` Paul Louvel [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=DKBTH7CXUX2R.S62IGDGU9MJZ@bootlin.com \
--to=paul.louvel@bootlin.com \
--cc=chleroy@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=herve.codina@bootlin.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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