]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: geode-aes - convert to skcipher API and make thread-safe
authorEric Biggers <ebiggers@google.com>
Fri, 11 Oct 2019 04:51:32 +0000 (21:51 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Oct 2019 08:46:56 +0000 (19:46 +1100)
commitf0a61b7d2cb6359c35b4f9096200796613baf546
tree576981916d31b365891a522c538b320d478892d6
parentf5184e2f94e76a4bd587f4a789922e9cb35229a5
crypto: geode-aes - convert to skcipher API and make thread-safe

The geode AES driver is heavily broken because it stores per-request
state in the transform context.  So it will crash or produce the wrong
result if used by any of the many places in the kernel that issue
concurrent requests for the same transform object.

This driver is also implemented using the deprecated blkcipher API,
which makes it difficult to fix, and puts it among the drivers
preventing that API from being removed.

Convert this driver to use the skcipher API, and change it to not store
per-request state in the transform context.

Fixes: f653aee52bae ("[PATCH] crypto: Add support for the Geode LX AES hardware")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/geode-aes.c
drivers/crypto/geode-aes.h