lkml.org 
[lkml]   [2023]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 1/5] crypto:caam - avoid allocating memory at crypto request runtime for skcipher
Date
Hi Eric,


Because of CRYPTO_ALG_ALLOCATES_MEMORY flag, caam algorithms are currently been skipped by dm-crypt, and we want to enable dm-crypt caam offload support.
As per earlier discussions, we are pre-allocating memory for 4 S/G entries and, if needed, extra memory will be allocated at runtime.

I suggest, we should update the documentation of CRYPTO_ALG_ALLOCATES_MEMORY with above information.

Thanks,
Meenakshi

> -----Original Message-----
> From: Eric Biggers <ebiggers@kernel.org>
> Sent: Saturday, June 10, 2023 7:49 AM
> To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
> Cc: Horia Geanta <horia.geanta@nxp.com>; Varun Sethi <V.Sethi@nxp.com>;
> Pankaj Gupta <pankaj.gupta@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Iuliana Prodan
> <iuliana.prodan@nxp.com>
> Subject: Re: [PATCH v2 1/5] crypto:caam - avoid allocating memory at crypto
> request runtime for skcipher
>
> On Fri, Jun 09, 2023 at 12:38:38PM +0200, meenakshi.aggarwal@nxp.com
> wrote:
> > If the driver needs more than the 4 entries maximum, the memory is
> > dynamically allocated, at runtime.
>
> Again, this is not currently allowed. Please see my comment on v1:
> https://lore.kern/
> el.org%2Flinux-
> crypto%2F20230523165503.GA864814%40google.com&data=05%7C01%7Cmee
> nakshi.aggarwal%40nxp.com%7Cfb75f9f6a37346e27eef08db695903a2%7C686
> ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638219603267394331%7CUn
> known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1
> haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ENoae4C6pFeMAIn%2B
> GVDqK%2F3PfwiqM0HEvFjjGMUepeo%3D&reserved=0
>
> - Eric

\
 
 \ /
  Last update: 2023-06-12 10:25    [W:0.064 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site