Re: [REGRESSION] alg: ahash: Several tests fail during boot on Turris Omnia

From: Herbert Xu
Date: Mon Oct 07 2024 - 04:27:24 EST


On Sun, Oct 06, 2024 at 11:23:12AM +0200, Klaus Kudielka wrote:
>
> Here we go.

Thanks!

I see where the problem is. Unfortunately this is not a regression,
but instead we've managed to identify an existing bug.

The cesa driver is buggy when you invoke it in parallel. This
would've previously resulted in incorrect hashes being produced,
which would not be easily discoverable (networking users would
simply retry if they hit this, while storage probably doesn't
use these algorithms at all).

What happened here is that the new async testing launches all
built-in algorithm self-tests at the same time and in parallel.
Previously self-tests of built-in algorithms were launched one-by-one
so there is only ever one test in flight at any moment.

This causes the cesa driver to be invoked in parallel, thus
triggering the buggy code where two hash requests would be submitted
to the hardware at the same time.

So I think it's a good thing that the self-test has managed to
discover this by itself and the result is also harmless, the buggy
algorithms are disabled.

I'll try to fix this but it's going to take some effort and I'll need
your help as I don't have the hardware myself.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt