public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Nathaniel Roach <nroach44@nroach44.id.au>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Andreas Larsson <andreas@gaisler.com>,
	"David S. Miller" <davem@davemloft.net>,
	sparclinux@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: Does the SPARC optimized crypto and CRC code actually work?
Date: Mon, 23 Mar 2026 11:20:42 -0700	[thread overview]
Message-ID: <20260323182042.GA2205@quark> (raw)
In-Reply-To: <29665ec3-5052-4cdd-8eb9-e6c91092de79@nroach44.id.au>

On Mon, Mar 23, 2026 at 06:36:52PM +0800, Nathaniel Roach wrote:
> On 17/3/26 15:16, John Paul Adrian Glaubitz wrote:
> > Hi Eric,
> > 
> > On Tue, 2026-03-17 at 03:45 +0000, Eric Biggers wrote:
> > > On Tue, Mar 17, 2026 at 10:48:52AM +0800, Nathaniel Roach wrote:
> > > > I've been testing some of the PCI changes that have come through on my T5-2.
> > > > I'll happily add some tests for the crypto functions, I've just got no idea
> > > > how to do so.
> > > Well, try enabling all KUnit tests in lib/crc/ and lib/crypto/, as well
> > > as CONFIG_CRYPTO_SELFTESTS=y and CONFIG_CRYPTO_SELFTESTS_FULL=y.
> > > 
> > > However, will this be a regular testing run, or only a one-off run?  If
> > > it will only be one-off, we'll quickly be back to where we started.
> > > 
> > > We need regular testing on either hardware or QEMU.
> > If Nathaniel can test the code from time to time for the time being, we should
> > already get some coverage. In the near future, we could certainly set up a CI
> > job if you let me know what infrastructure to use for it.
> > 
> > Please keep in mind that a lot of us are doing this as volunteers and we don't
> > always have the possibilities to respond to such requests within a short time.
> > 
> > Feel free to use the sparclinux issue tracker if you want to file any requests:
> > 
> > https://github.com/sparclinux/issues/issues
> > 
> > Adrian
> I enabled the below options, based on what I could find, in my test config:
> 
> CONFIG_CRYPTO_SELFTESTS=y
> CONFIG_CRYPTO_SELFTESTS_FULL=y
> CONFIG_CRYPTO_ARIA,BLOWFISH,CAMELLIA,CAST5,CAST6,DES,FCRYPT,SERPENT,
>   SM4_GENERIC,TWOFISH,CTR=m
> CONFIG_CRC_KUNIT_TEST=m
> CONFIG_CRC_BENCHMARK=y
> CONFIG_CRYPTO_LIB_BENCHMARK=y
> CONFIG_DEBUG_MEMORY_INIT=y
> CONFIG_KUNIT=m

I recommend using the latest linux-next, to get the latest KUnit-related
kconfig updates, and using the following on top of sparc64_defconfig:

(
    cat lib/{crc,crypto}/.kunitconfig
    echo CONFIG_EXPERT=y
    echo CONFIG_CRYPTO=y
    echo CONFIG_CRYPTO_SELFTESTS=y
    echo CONFIG_CRYPTO_SELFTESTS_FULL=y
    echo CONFIG_CRYPTO_DES_SPARC64=y
    echo CONFIG_CRYPTO_AES_SPARC64=y
    echo CONFIG_CRYPTO_CAMELLIA_SPARC64=y
    echo CONFIG_CRYPTO_AES=y
    echo CONFIG_CRYPTO_DES=y
    echo CONFIG_CRYPTO_CAMELLIA=y
    echo CONFIG_CRYPTO_ECB=y
    echo CONFIG_CRYPTO_CBC=y
    echo CONFIG_CRYPTO_CTR=y
) >> .config

Note: most of the complexity here is to fully enable the traditional
crypto self-tests to cover arch/sparc/crypto/.  The plan is to finish
migrating those into lib/crypto/, in which case that code will become
covered by the lib/crypto/ tests and only the kunitconfigs would be
needed.  But for now, the traditional tests are still needed too.

- Eric

      reply	other threads:[~2026-03-23 18:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 20:42 Does the SPARC optimized crypto and CRC code actually work? Eric Biggers
2026-03-17  2:48 ` Nathaniel Roach
2026-03-17  3:45   ` Eric Biggers
2026-03-17  7:16     ` John Paul Adrian Glaubitz
2026-03-17 14:06       ` Theodore Tso
2026-03-17 14:14         ` John Paul Adrian Glaubitz
2026-03-22 14:59           ` Eric Biggers
2026-03-23  5:58             ` John Paul Adrian Glaubitz
2026-03-23 10:36       ` Nathaniel Roach
2026-03-23 18:20         ` 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=20260323182042.GA2205@quark \
    --to=ebiggers@kernel.org \
    --cc=andreas@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=nroach44@nroach44.id.au \
    --cc=sparclinux@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