From: Herbert Xu <herbert@gondor.apana.org.au>
To: T Pratham <t-pratham@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Manorit Chawdhry <m-chawdhry@ti.com>,
Kamlesh Gurudasani <kamlesh@ti.com>,
Shiva Tripathi <s-tripathi1@ti.com>,
Kavitha Malarvizhi <k-malarvizhi@ti.com>,
Vishal Mahaveer <vishalm@ti.com>,
Praneeth Bajjuri <praneeth@ti.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: aead - Add support for on-stack AEAD req allocation
Date: Fri, 31 Oct 2025 17:46:20 +0800 [thread overview]
Message-ID: <aQSFbEdedID5f5B8@gondor.apana.org.au> (raw)
In-Reply-To: <20251022171902.724369-2-t-pratham@ti.com>
On Wed, Oct 22, 2025 at 10:48:42PM +0530, T Pratham wrote:
> This patch introduces infrastructure for allocating req objects on the
> stack for AEADs. The additions mirror the existing sync skcipher APIs.
> This can be used in cases where simple sync AEAD operations are being
> done. So allocating the request on stack avoides possible out-of-memory
> errors.
>
> The struct crypto_sync_aead is a wrapper around crypto_aead and should
> be used in its place when sync only requests will be done on the stack.
> Correspondingly, the request should be allocated with
> SYNC_AEAD_REQUEST_ON_STACK().
>
> Similar to sync_skcipher APIs, the new sync_aead APIs are wrappers
> around the regular aead APIs to facilitate sync only operations. The
> following crypto APIs are added:
> - struct crypto_sync_aead
> - crypto_alloc_sync_aead()
> - crypto_free_sync_aead()
> - crypto_aync_aead_tfm()
> - crypto_sync_aead_setkey()
> - crypto_sync_aead_setauthsize()
> - crypto_sync_aead_authsize()
> - crypto_sync_aead_maxauthsize()
> - crypto_sync_aead_ivsize()
> - crypto_sync_aead_blocksize()
> - crypto_sync_aead_get_flags()
> - crypto_sync_aead_set_flags()
> - crypto_sync_aead_clear_flags()
> - crypto_sync_aead_reqtfm()
> - aead_request_set_sync_tfm()
> - SYNC_AEAD_REQUEST_ON_STACK()
>
> Signed-off-by: T Pratham <t-pratham@ti.com>
> ---
> crypto/aead.c | 19 ++++++++++
> include/crypto/aead.h | 87 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 106 insertions(+)
Patch applied. 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
prev parent reply other threads:[~2025-10-31 9:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 17:18 T Pratham
2025-10-31 9:46 ` Herbert Xu [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=aQSFbEdedID5f5B8@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=k-malarvizhi@ti.com \
--cc=kamlesh@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-chawdhry@ti.com \
--cc=praneeth@ti.com \
--cc=s-tripathi1@ti.com \
--cc=t-pratham@ti.com \
--cc=vishalm@ti.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®