RE: [PATCH 1/3] dm integrity: do not filter algos with CRYPTO_ALG_ALLOCATES_MEMORY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Herbert for your reply.

Will look around this.

> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: 18 February 2025 14:07
> To: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>; Eric Biggers
> <ebiggers@xxxxxxxxxx>; agk@xxxxxxxxxx; snitzer@xxxxxxxxxx; linux-
> crypto@xxxxxxxxxxxxxxx; dm-devel@xxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; qat-linux@xxxxxxxxx; heinzm@xxxxxxxxxx; Horia
> Geanta <horia.geanta@xxxxxxx>; Varun Sethi <V.Sethi@xxxxxxx>; Pankaj
> Gupta <pankaj.gupta@xxxxxxx>; Gaurav Jain <gaurav.jain@xxxxxxx>;
> davem@xxxxxxxxxxxxx; Iuliana Prodan <iuliana.prodan@xxxxxxx>; Fiona
> Trahe <fiona.trahe@xxxxxxxxx>
> Subject: Re: [PATCH 1/3] dm integrity: do not filter algos with
> CRYPTO_ALG_ALLOCATES_MEMORY
> 
> On Wed, Feb 07, 2024 at 06:22:06AM +0000, Meenakshi Aggarwal wrote:
> >
> > What are your plans for this change?
> 
> I finally have a solution for you.
> 
> The answer is to use a software fallback.  As software fallbacks do not need to
> allocate memory, they can be used in an OOM situation and you fail to
> allocate memory in the driver with GFP_ATOMIC.
> 
> This can either be done using the existing shash interface through
> SHASH_DESC_ON_STACK, or with my new hash interface where you can use
> HASH_REQUEST_ON_STACK.
> 
> Once you have implemented this fallback strategy you may remove the
> CRYPTO_ALG_ALLOCATES_MEMORY flag from your driver.
> 
> Cheers,
> --
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page:
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgondor.
> apana.org.au%2F~herbert%2F&data=05%7C02%7Cmeenakshi.aggarwal%40n
> xp.com%7Cf6d4a8e6289b4a9dc1af08dd4ff783d3%7C686ea1d3bc2b4c6fa92c
> d99c5c301635%7C0%7C0%7C638754646705133902%7CUnknown%7CTWFpb
> GZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zM
> iIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2BfhgGBR
> wm7gYcwhIu5%2FIqM9H%2BypKSqy4zOG0wOwNiOw%3D&reserved=0
> PGP Key:
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgondor.
> apana.org.au%2F~herbert%2Fpubkey.txt&data=05%7C02%7Cmeenakshi.agga
> rwal%40nxp.com%7Cf6d4a8e6289b4a9dc1af08dd4ff783d3%7C686ea1d3bc2b
> 4c6fa92cd99c5c301635%7C0%7C0%7C638754646705157205%7CUnknown%7
> CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJ
> XaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2
> BRonzL%2F8MSMEfp2DotM%2FkRx1bIWDStLckhzmH8nVcjc%3D&reserved=0





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux