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@xxxxxxxxxx> > Sent: Saturday, June 10, 2023 7:49 AM > To: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx> > Cc: Horia Geanta <horia.geanta@xxxxxxx>; Varun Sethi <V.Sethi@xxxxxxx>; > Pankaj Gupta <pankaj.gupta@xxxxxxx>; Gaurav Jain <gaurav.jain@xxxxxxx>; > herbert@xxxxxxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; linux- > crypto@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Iuliana Prodan > <iuliana.prodan@xxxxxxx> > 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@xxxxxxx > 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