]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: vmx - Fixing GHASH Key issue on little endian
authorLeonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Fri, 14 Aug 2015 13:14:16 +0000 (10:14 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:10:54 +0000 (10:10 -0700)
commit859fe08991ab7b6996b79e1d70af2ffb5e2ef1ae
treecd9a948b78c04d43e0648ae09f3f3982dd10e13d
parent30c3a5fe42df2e9fa12d8e2d753d9e0c25d9d28b
crypto: vmx - Fixing GHASH Key issue on little endian

commit 3c5f0ed78e976be705218cad62acf6a68e9d121e upstream.

GHASH table algorithm is using a big endian key.
In little endian machines key will be LE ordered.
After a lxvd2x instruction key is loaded as it is,
LE/BE order, in first case it'll generate a wrong
table resulting in wrong hashes from the algorithm.

Bug affects only LE machines.
In order to fix it we do a swap for loaded key.

Signed-off-by: Leonidas S Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/vmx/ghashp8-ppc.pl