mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: aousherovitch@rambus.com
Cc: Saravanakrishnan Krishnamoorthy <skrishnamoorthy@rambus.com>,
	Joel Wittenauer <Joel.Wittenauer@cryptography.com>,
	Thi Nguyen <thin@rambus.com>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v9 4/5] crypto: cmh - add AES skcipher/aead/cmac
Date: Fri, 27 Nov 2026 12:29:50 +0800	[thread overview]
Message-ID: <awkHPjWDibjxrb7F@gondor.apana.org.au> (raw)
In-Reply-To: <20261118-cmh-b4-a-v9-v9-4-70385613fd50@rambus.com>

On Wed, Nov 18, 2026 at 09:51:48AM -0800, Alex Ousherovitch via B4 Relay wrote:
>
> +/*
> + * Incremental operations and request-state export/import forward to the
> + * keyed generic cmac(aes) fallback allocated in cmh_aes_cmac_init_tfm().
> + * The AES core cannot save/restore intermediate CMAC state, so the
> + * fallback holds the request state; it is synchronous, was
> + * keyed by cmh_aes_cmac_setkey(), and handles both scatterlist and
> + * virtual (CRYPTO_AHASH_REQ_VIRT) input.
> + */
> +static int cmh_aes_cmac_init(struct ahash_request *req)
> +{
> +	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
> +	struct cmh_aes_cmac_tfm_ctx *tctx = crypto_ahash_ctx(tfm);
> +	struct cmh_aes_cmac_reqctx *rctx = ahash_request_ctx(req);
> +	struct ahash_request *fb_req = cmh_aes_cmac_fb_req(rctx);
> +
> +	ahash_request_set_tfm(fb_req, tctx->fb);
> +	ahash_request_set_callback(fb_req, 0, NULL, NULL);
> +	return crypto_ahash_init(fb_req);

Please don't use embedded fallback requests.  Put them on the stack
instead with HASH_FBREQ_ON_STACK.

Thanks,
-- 
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

  reply	other threads:[~2026-11-27  4:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 17:51 [PATCH v9 0/5] crypto: cmh - add Rambus CryptoManager Hub core driver and AES Alex Ousherovitch via B4 Relay
2026-11-18 17:51 ` [PATCH v9 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub Alex Ousherovitch via B4 Relay
2026-11-18 17:51 ` [PATCH v9 2/5] crypto: cmh - add core platform driver Alex Ousherovitch via B4 Relay
2026-11-18 17:51 ` [PATCH v9 3/5] crypto: cmh - add key/datastore infrastructure Alex Ousherovitch via B4 Relay
2026-11-18 17:51 ` [PATCH v9 4/5] crypto: cmh - add AES skcipher/aead/cmac Alex Ousherovitch via B4 Relay
2026-11-27  4:29   ` Herbert Xu [this message]
2026-11-18 17:51 ` [PATCH v9 5/5] MAINTAINERS: add Rambus CryptoManager Hub (CMH) Alex Ousherovitch via B4 Relay

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=awkHPjWDibjxrb7F@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=Joel.Wittenauer@cryptography.com \
    --cc=aousherovitch@rambus.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=skrishnamoorthy@rambus.com \
    --cc=thin@rambus.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®