lkml.org 
[lkml]   [2020]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/5] crypto: caam - avoid allocating memory at crypto request runtime
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

\
 
 \ /
  Last update: 2020-12-03 09:40    [W:0.105 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site