summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-03-11 17:09:25 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-03-17 11:16:44 +0800
commite6af5c0c4d32a27e04a56f29aad587e03ff427f1 (patch)
tree2c72d727fa67b443ad31062ba39f75e925d35e99 /crypto/algapi.c
parent9fa4298a95ec42cb63dc5aaf2a8656bb23adf280 (diff)
crypto: stm32 - Save and restore between each request
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@nfschina.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algapi.c')
0 files changed, 0 insertions, 0 deletions