Thread (14 messages) 14 messages, 6 authors, 2025-02-20

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

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-02-18 08:37:34
Also in: lkml

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 [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help