[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z7RGwot_t0RLc3-F@gondor.apana.org.au>
Date: Tue, 18 Feb 2025 16:37:22 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Meenakshi Aggarwal <meenakshi.aggarwal@....com>
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
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: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists