Re: [v3 PATCH] crypto: marvell/cesa - Do not chain submitted requests

Herbert Xu
2025-05-10T01:44:28Z

On Sat, May 10, 2025 at 09:37:58AM +0800, Herbert Xu wrote:
>
> In particular, when testmgr does an update+final, it will give a
> non-NULL SG list to the final call.

This ties in with all the test results so far because it appears
that all the failed test vectors involve a final call.

> The buggy code in marvell/cesa will then read that non-NULL SG list
> during the final call and overwrite the cached bytes with it.
> However, I still can't see why that would make a difference because
> it should contain the same data.

I think I can see where it does make a difference. The SG list
is never mapped during the final call. So the DMA address is going
to be either crap or more likely the address from the previous
update call where it was mapped.

Now depending on how DMA mapping works on your platform, that may
indeed be buggy during concurrent calls only.

Cheers,