summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2019-04-22 13:25:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-22 07:37:36 +0200
commit7a32ad34b889f874be154ec93aff892c975d2731 (patch)
tree3decbad9f675b66ede23ac6523d78a54fc89440d /crypto
parentc1ec6beac625c55fb1e4a9706852c9cbf11fe49f (diff)
downloadlinux-stable-7a32ad34b889f874be154ec93aff892c975d2731.tar.gz
linux-stable-7a32ad34b889f874be154ec93aff892c975d2731.tar.bz2
linux-stable-7a32ad34b889f874be154ec93aff892c975d2731.zip
crypto: crypto4xx - fix cfb and ofb "overran dst buffer" issues
commit 7e92e1717e3eaf6b322c252947c696b3059f05be upstream. Currently, crypto4xx CFB and OFB AES ciphers are failing testmgr's test vectors. |cfb-aes-ppc4xx encryption overran dst buffer on test vector 3, cfg="in-place" |ofb-aes-ppc4xx encryption overran dst buffer on test vector 1, cfg="in-place" This is because of a very subtile "bug" in the hardware that gets indirectly mentioned in 18.1.3.5 Encryption/Decryption of the hardware spec: the OFB and CFB modes for AES are listed there as operation modes for >>> "Block ciphers" <<<. Which kind of makes sense, but we would like them to be considered as stream ciphers just like the CTR mode. To workaround this issue and stop the hardware from causing "overran dst buffer" on crypttexts that are not a multiple of 16 (AES_BLOCK_SIZE), we force the driver to use the scatter buffers as the go-between. As a bonus this patch also kills redundant pd_uinfo->num_gd and pd_uinfo->num_sd setters since the value has already been set before. Cc: stable@vger.kernel.org Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions