From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "Iuliana Prodan (OSS)" <iuliana.prodan@oss.nxp.com>,
"David S. Miller" <davem@davemloft.net>,
Horia Geanta <horia.geanta@nxp.com>,
Aymen Sghaier <aymen.sghaier@nxp.com>,
Silvano Di Ninno <silvano.dininno@nxp.com>,
Franck Lenormand <franck.lenormand@nxp.com>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-imx <linux-imx@nxp.com>,
Iuliana Prodan <iuliana.prodan@nxp.com>
Subject: Re: [PATCH 0/5] crypto: caam - avoid allocating memory at crypto request runtime
Date: Thu, 3 Dec 2020 19:38:29 +1100 [thread overview]
Message-ID: <20201203083829.GA20873@gondor.apana.org.au> (raw)
In-Reply-To: <CAMj1kXH+a2ZH=06GXsz4Lj2Bx2YOHmGubeY6i7x=ar5ubvP+7g@mail.gmail.com>
On Thu, Dec 03, 2020 at 09:34:08AM +0100, Ard Biesheuvel wrote:
>
> > CRYPTO_ALG_ALLOCATES_MEMORY flag is limited only to
> > dm-crypt use-cases, which seems to be 4 entries maximum.
> > Therefore in reqsize we allocate memory for maximum 4 entries
> > for src and 4 for dst, aligned.
> > If the driver needs more than the 4 entries maximum, the memory
> > is dynamically allocated, at runtime.
>
> I'm confused. So the driver does allocate memory in some cases, right?
> So why is it justified to remove CRYPTO_ALG_ALLOCATES_MEMORY?
Because it's only required by dm-crypt, we should modify the
semantics for ALLOCATES_MEMORY such that it only includes those
that require allocations even when the SG list is of 4 entries
or less.
We should update the documentation.
Cheers,
--
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:[~2020-12-03 8:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 1:35 [PATCH 0/5] crypto: caam - avoid allocating memory at crypto request runtime Iuliana Prodan (OSS)
2020-12-03 1:35 ` [PATCH 1/5] crypto: caam/jr - avoid allocating memory at crypto request runtime for skcipher Iuliana Prodan (OSS)
2020-12-03 1:35 ` [PATCH 2/5] crypto: caam/jr - avoid allocating memory at crypto request runtime for aead Iuliana Prodan (OSS)
2020-12-03 1:35 ` [PATCH 3/5] crypto: caam/jr - avoid allocating memory at crypto request runtime fost hash Iuliana Prodan (OSS)
2020-12-03 1:35 ` [PATCH 4/5] crypto: caam/qi - avoid allocating memory at crypto request runtime Iuliana Prodan (OSS)
2020-12-03 1:35 ` [PATCH 5/5] crypto: caam/qi2 " Iuliana Prodan (OSS)
2020-12-03 8:34 ` [PATCH 0/5] crypto: caam " Ard Biesheuvel
2020-12-03 8:38 ` Herbert Xu [this message]
2020-12-10 8:28 ` Horia Geantă
2020-12-11 10:09 ` Herbert Xu
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=20201203083829.GA20873@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ardb@kernel.org \
--cc=aymen.sghaier@nxp.com \
--cc=davem@davemloft.net \
--cc=franck.lenormand@nxp.com \
--cc=horia.geanta@nxp.com \
--cc=iuliana.prodan@nxp.com \
--cc=iuliana.prodan@oss.nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=silvano.dininno@nxp.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;
as well as URLs for NNTP newsgroup(s).