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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux