[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6wasftL23_K8vA2@gondor.apana.org.au>
Date: Wed, 12 Feb 2025 11:51:13 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Alexey Romanov <avromanov@...utedevices.com>
Cc: clabbe@...libre.com, conor+dt@...nel.org, davem@...emloft.net,
devicetree@...r.kernel.org, jbrunet@...libre.com,
kernel@...utedevices.com, khilman@...libre.com, krzk+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org,
linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, martin.blumenstingl@...glemail.com,
neil.armstrong@...aro.org, robh+dt@...nel.org,
vadim.fedorenko@...ux.dev
Subject: Re: [PATCH v11 11/22] crypto: amlogic - Introduce hasher
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@...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