]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commite2248207e333f5c069b15196a4988f0377b1c4aa
tree577f1c1dbcb41ef38ca3ac12c02069906c5612a9
parent2fc1f870bd4f0d9447207aa8700ebb57e32c7774
crypto: geode-aes - convert to skcipher API and make thread-safe

BugLink: https://bugs.launchpad.net/bugs/1866678
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/crypto/geode-aes.c
drivers/crypto/geode-aes.h