[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB8301A857849714D169DE8F088EC42@PAXPR04MB8301.eurprd04.prod.outlook.com>
Date: Thu, 20 Feb 2025 10:18:15 +0000
From: Meenakshi Aggarwal <meenakshi.aggarwal@....com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: Giovanni Cabiddu <giovanni.cabiddu@...el.com>, Eric Biggers
<ebiggers@...nel.org>, "agk@...hat.com" <agk@...hat.com>,
"snitzer@...nel.org" <snitzer@...nel.org>, "linux-crypto@...r.kernel.org"
<linux-crypto@...r.kernel.org>, "dm-devel@...hat.com" <dm-devel@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"qat-linux@...el.com" <qat-linux@...el.com>, "heinzm@...hat.com"
<heinzm@...hat.com>, Horia Geanta <horia.geanta@....com>, Varun Sethi
<V.Sethi@....com>, Pankaj Gupta <pankaj.gupta@....com>, Gaurav Jain
<gaurav.jain@....com>, "davem@...emloft.net" <davem@...emloft.net>, Iuliana
Prodan <iuliana.prodan@....com>, Fiona Trahe <fiona.trahe@...el.com>
Subject: RE: [PATCH 1/3] dm integrity: do not filter algos with
CRYPTO_ALG_ALLOCATES_MEMORY
Thank you Herbert for your reply.
Will look around this.
> -----Original Message-----
> From: Herbert Xu <herbert@...dor.apana.org.au>
> Sent: 18 February 2025 14:07
> To: Meenakshi Aggarwal <meenakshi.aggarwal@....com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@...el.com>; Eric Biggers
> <ebiggers@...nel.org>; agk@...hat.com; snitzer@...nel.org; linux-
> crypto@...r.kernel.org; dm-devel@...hat.com; linux-
> kernel@...r.kernel.org; qat-linux@...el.com; heinzm@...hat.com; Horia
> Geanta <horia.geanta@....com>; Varun Sethi <V.Sethi@....com>; Pankaj
> Gupta <pankaj.gupta@....com>; Gaurav Jain <gaurav.jain@....com>;
> davem@...emloft.net; Iuliana Prodan <iuliana.prodan@....com>; Fiona
> Trahe <fiona.trahe@...el.com>
> 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@...dor.apana.org.au> 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
Powered by blists - more mailing lists