From: Eric Biggers <ebiggers@kernel.org>
To: AlanSong-oc <AlanSong-oc@zhaoxin.com>
Cc: herbert@gondor.apana.org.au, Jason@zx2c4.com, ardb@kernel.org,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
CobeChen@zhaoxin.com, TonyWWang-oc@zhaoxin.com,
YunShen@zhaoxin.com, GeorgeXue@zhaoxin.com,
LeoLiu-oc@zhaoxin.com, HansHu@zhaoxin.com
Subject: Re: [PATCH v2 0/2] lib/crypto: x86/sha: Add PHE Extensions support
Date: Fri, 19 Dec 2025 10:33:57 -0800 [thread overview]
Message-ID: <20251219183357.GA1602@sol> (raw)
In-Reply-To: <cover.1766131281.git.AlanSong-oc@zhaoxin.com>
On Fri, Dec 19, 2025 at 04:03:04PM +0800, AlanSong-oc wrote:
> For Zhaoxin processors, the XSHA1 instruction requires the total memory
> allocated at %rdi register must be 32 bytes, while the XSHA1 and
> XSHA256 instruction doesn't perform any operation when %ecx is zero.
>
> Due to these requirements, the current padlock-sha driver does not work
> correctly with Zhaoxin processors. It cannot pass the self-tests and
> therefore does not activate the driver on Zhaoxin processors. This issue
> has been reported in Debian [1]. The self-tests fail with the
> following messages [2]:
>
> alg: shash: sha1-padlock-nano test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
> alg: self-tests for sha1 using sha1-padlock-nano failed (rc=-22)
> ------------[ cut here ]------------
>
> alg: shash: sha256-padlock-nano test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
> alg: self-tests for sha256 using sha256-padlock-nano failed (rc=-22)
> ------------[ cut here ]------------
This cover letter is misleading, as those self-test failures will still
exist regardless of this patch series.
> To enable XSHA1 and XSHA256 instruction support on Zhaoxin processors,
> this series adds PHE Extensions support to lib/crypto for SHA-1 and
> SHA-256, following the suggestion in [3].
>
> v1 link is below:
> https://lore.kernel.org/linux-crypto/20250611101750.6839-1-AlanSong-oc@zhaoxin.com/
Please run the sha1 and sha256 KUnit test suites
(CRYPTO_LIB_SHA1_KUNIT_TEST and CRYPTO_LIB_SHA256_KUNIT_TEST) before and
after this series, with the benchmark enabled (CRYPTO_LIB_BENCHMARK),
and show the results. For this series to be considered, the tests need
to pass and there needs to be a significant performance improvement.
- Eric
prev parent reply other threads:[~2025-12-19 18:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 8:03 [PATCH v2 0/2] lib/crypto: x86/sha: Add PHE Extensions support AlanSong-oc
2025-12-19 8:03 ` [PATCH v2 1/2] lib/crypto: x86/sha1: PHE Extensions optimized SHA1 transform function AlanSong-oc
2025-12-19 18:18 ` Eric Biggers
2025-12-19 8:03 ` [PATCH v2 2/2] lib/crypto: x86/sha256: PHE Extensions optimized SHA256 " AlanSong-oc
2025-12-19 18:33 ` Eric Biggers [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=20251219183357.GA1602@sol \
--to=ebiggers@kernel.org \
--cc=AlanSong-oc@zhaoxin.com \
--cc=CobeChen@zhaoxin.com \
--cc=GeorgeXue@zhaoxin.com \
--cc=HansHu@zhaoxin.com \
--cc=Jason@zx2c4.com \
--cc=LeoLiu-oc@zhaoxin.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=YunShen@zhaoxin.com \
--cc=ardb@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).