[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdav9u1_YR7mc9iz2OR=6itHhgGBFobZdtniZ7TttLY0Tw@mail.gmail.com>
Date: Sat, 11 Mar 2023 22:45:44 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Lionel Debieve <lionel.debieve@...s.st.com>,
Li kunyu <kunyu@...china.com>, davem@...emloft.net,
linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com, mcoquelin.stm32@...il.com
Subject: Re: [v7 PATCH 8/8] crypto: stm32 - Save and restore between each request
On Sat, Mar 11, 2023 at 10:09 AM Herbert Xu <herbert@...dor.apana.org.au> wrote:
> The Crypto API hashing paradigm requires the hardware state to
> be exported between *each* request because multiple unrelated
> hashes may be processed concurrently.
>
> The stm32 hardware is capable of producing the hardware hashing
> state but it was only doing it in the export function. This is
> not only broken for export as you can't export a kernel pointer
> and reimport it, but it also means that concurrent hashing was
> fundamentally broken.
>
> Fix this by moving the saving and restoring of hardware hash
> state between each and every hashing request.
>
> Fixes: 8a1012d3f2ab ("crypto: stm32 - Support for STM32 HASH module")
> Reported-by: Li kunyu <kunyu@...china.com>
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Tested-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists