]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:24:54 +0000 (16:24 +0100)
commitfba0fecdd99780196cbe14b11e944ff678aa86cf
tree3d0b40172d54c4a4105129bfa877b0c617a7ad67
parent76a986b96a3d42c6b2bef01f9881dcb6f05fa64a
crypto: geode-aes - convert to skcipher API and make thread-safe

BugLink: https://bugs.launchpad.net/bugs/1861085
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/crypto/geode-aes.c
drivers/crypto/geode-aes.h