Thread (27 messages) 27 messages, 2 authors, 2025-02-12

Re: [PATCH v11 11/22] crypto: amlogic - Introduce hasher

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-02-12 03:51:38
Also in: linux-amlogic, linux-crypto, linux-devicetree, lkml

On Wed, Jan 22, 2025 at 03:41:29PM +0300, Alexey Romanov wrote:
Why? I couldn't find this explanation anywhere.
Because the digest function can be called from atomic contexts,
such as networking.
In addition, I found an example of one of the digest functions that is sleeping [1].

Links:

  - [1] https://elixir.bootlin.com/linux/v6.12.6/source/drivers/crypto/mxs-dcp.c#L804
That driver is just broken.  If you look through the git history,
you'll find that a similar problem was fixed by replacing the
mutex with a spinlock in the cipher path.  Unfortunately the same
fix hasn't been extended to hashing in mxs-dcp.

Cheeers,
-- 
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