]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:34:00 +0000 (04:34 -0800)
commit2554cdfa1d0369083bca97df2a5b121a276e11ad
tree8e1db8b49d6ad8e3a0a677059ef5591f317ad03e
parent81f076b88f032d54e30fbb3f64fc35077d31dcf9
crypto: geode-aes - convert to skcipher API and make thread-safe

commit 4549f7e5aa27ffc2cba63b5db8842a3b486f5688 upstream.

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: 9fe757b0cfce ("[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>
Signed-off-by: Florian Bezdeka <florian@bezdeka.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/geode-aes.c
drivers/crypto/geode-aes.h