From: Herbert Xu <herbert@gondor.apana.org.au>
To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
Eric Biggers <ebiggers@kernel.org>,
"agk@redhat.com" <agk@redhat.com>,
"snitzer@kernel.org" <snitzer@kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"dm-devel@redhat.com" <dm-devel@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"qat-linux@intel.com" <qat-linux@intel.com>,
"heinzm@redhat.com" <heinzm@redhat.com>,
Horia Geanta <horia.geanta@nxp.com>,
Varun Sethi <V.Sethi@nxp.com>,
Pankaj Gupta <pankaj.gupta@nxp.com>,
Gaurav Jain <gaurav.jain@nxp.com>,
"davem@davemloft.net" <davem@davemloft.net>,
Iuliana Prodan <iuliana.prodan@nxp.com>,
Fiona Trahe <fiona.trahe@intel.com>
Subject: Re: [PATCH 1/3] dm integrity: do not filter algos with CRYPTO_ALG_ALLOCATES_MEMORY
Date: Tue, 18 Feb 2025 16:37:22 +0800 [thread overview]
Message-ID: <Z7RGwot_t0RLc3-F@gondor.apana.org.au> (raw)
In-Reply-To: <PAXPR04MB8301C112A114A6AC5A19D69B8E452@PAXPR04MB8301.eurprd04.prod.outlook.com>
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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2025-02-18 8:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 16:40 [PATCH 0/3] crypto: adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY Giovanni Cabiddu
2023-07-05 16:40 ` [PATCH 1/3] dm integrity: do not filter algos with CRYPTO_ALG_ALLOCATES_MEMORY Giovanni Cabiddu
2023-07-05 20:12 ` Eric Biggers
2023-07-05 20:57 ` Giovanni Cabiddu
2023-07-05 21:57 ` Herbert Xu
2024-02-07 6:22 ` Meenakshi Aggarwal
2025-02-18 8:37 ` Herbert Xu [this message]
2025-02-20 10:18 ` Meenakshi Aggarwal
2024-07-04 10:39 ` Horia Geanta
2023-07-07 10:25 ` [dm-devel] " Mikulas Patocka
2023-07-05 16:40 ` [PATCH 2/3] crypto: api - adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY Giovanni Cabiddu
2023-07-05 20:18 ` Eric Biggers
2023-07-07 10:41 ` [dm-devel] " Mikulas Patocka
2023-07-05 16:40 ` [PATCH 3/3] crypto: qat - remove CRYPTO_ALG_ALLOCATES_MEMORY flag Giovanni Cabiddu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z7RGwot_t0RLc3-F@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=V.Sethi@nxp.com \
--cc=agk@redhat.com \
--cc=davem@davemloft.net \
--cc=dm-devel@redhat.com \
--cc=ebiggers@kernel.org \
--cc=fiona.trahe@intel.com \
--cc=gaurav.jain@nxp.com \
--cc=giovanni.cabiddu@intel.com \
--cc=heinzm@redhat.com \
--cc=horia.geanta@nxp.com \
--cc=iuliana.prodan@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meenakshi.aggarwal@nxp.com \
--cc=pankaj.gupta@nxp.com \
--cc=qat-linux@intel.com \
--cc=snitzer@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox