From: Herbert Xu <herbert@gondor.apana.org.au>
To: Pavitrakumar Managutte <pavitrakumarm@vayavyalabs.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, robh@kernel.org, krzk@kernel.org,
conor+dt@kernel.org, ruud.derwig@gf.com, rbannerm@synopsys.com,
manjunath.hadli@vayavyalabs.com, adityak@vayavyalabs.com,
navami.telsang@vayavyalabs.com, bhoomikak@vayavyalabs.com,
nazim.khan@vayavyalabs.com
Subject: Re: [PATCH v25 2/4] crypto: spacc - Add SPAcc ahash support
Date: Thu, 8 Oct 2026 19:32:48 +1100 [thread overview]
Message-ID: <asdVMLcq6hELZ-eU@gondor.apana.org.au> (raw)
In-Reply-To: <CALxtO0nptFbjV-h567rag=ibWTxb_2PtG4ZEKCiAufTt-g-bUg@mail.gmail.com>
On Fri, Oct 02, 2026 at 10:42:44AM +0530, Pavitrakumar Managutte wrote:
> Hi Herbert,
> My comments are embedded below.
>
> Also while bringing up an async ahash SPAcc driver against 7.3-rc1,
> cmac(aes) and xcbc(aes) fail their self-tests at tfm allocation, and
> I'd like to understand whether the underlying cause is intentional
> before I work around it in the driver.
>
> All tests pass for every hash and HMAC we register, except cmac(aes)
> and xcbc(aes). For cmac(aes)/xcbc(aes) it fails.
>
> crypto_ahash_init_tfm() allocates the fallback with:
>
> crypto_alloc_ahash(name, CRYPTO_ALG_REQ_VIRT,
> CRYPTO_ALG_ASYNC | CRYPTO_ALG_REQ_VIRT |
> CRYPTO_AHASH_ALG_NO_EXPORT_CORE);
>
> On our tree no cmac(aes)/xcbc(aes) provider satisfies that: with both
> CONFIG_CRYPTO_CMAC/XCBC=y and CONFIG_CRYPTO_LIB_AES_CBC_MACS=y,
> neither the crypto/cmac.c template nor the new AES-CMAC library shash
> implements export_core/import_core, so both report NO_EXPORT_CORE. The
> allocation finds no candidate and returns -EINVAL.
>
> alg: hash: failed to allocate transform for spacc-cmac(aes): -22
>
> The library shash matches ASYNC=0 and REQ_VIRT but is rejected on
> NO_EXPORT_CORE. No candidate remains. CONFIG_CRYPTO_SELFTESTS_FULL=y,
> so this is hit deterministically.
>
> This looks like the case flagged in "crypto: sha256 - Implement
> export_core() and import_core()" (Eric, Sep 2025), which notes that
> since
> commit 9d7a0ab1c753 export_core/import_core "effectively became
> mandatory... since legacy drivers that need a fallback depend on
> them."
> sha256/sha512/md5/hmac gained export_core, but cmac(aes)/xcbc(aes) did not.
>
> Is the absence of export_core/import_core on cmac(aes)/xcbc(aes)
> intentional -- i.e. async offload drivers must not rely on the core
> software fallback for these MACs -- or is it an oversight that should
> be addressed the way sha256 was?
I will fix this up.
Thanks for letting me know.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2026-10-08 8:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 15:59 [PATCH v25 0/4] crypto: spacc - Add SPAcc Crypto Driver Pavitrakumar Managutte
2026-09-07 15:59 ` [PATCH v25 1/4] dt-bindings: crypto: Document support for SPAcc Pavitrakumar Managutte
2026-09-07 15:59 ` [PATCH v25 2/4] crypto: spacc - Add SPAcc ahash support Pavitrakumar Managutte
2026-09-18 8:40 ` Herbert Xu
2026-10-02 5:12 ` Pavitrakumar Managutte
2026-10-08 8:32 ` Herbert Xu [this message]
2026-09-07 15:59 ` [PATCH v25 3/4] crypto: spacc - add spacc autodetect support Pavitrakumar Managutte
2026-09-07 15:59 ` [PATCH v25 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile Pavitrakumar Managutte
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=asdVMLcq6hELZ-eU@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=adityak@vayavyalabs.com \
--cc=bhoomikak@vayavyalabs.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manjunath.hadli@vayavyalabs.com \
--cc=navami.telsang@vayavyalabs.com \
--cc=nazim.khan@vayavyalabs.com \
--cc=pavitrakumarm@vayavyalabs.com \
--cc=rbannerm@synopsys.com \
--cc=robh@kernel.org \
--cc=ruud.derwig@gf.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
all inboxes | Powered by JetHome®