crypto: s390 - Fix aes-xts parameter corruption
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Tue, 19 Nov 2013 16:12:47 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 23:02:15 +0000 (16:02 -0700)
commit8ba2272db8bd9fd6f011949020bf1991605b1c14
treedf82dbe442cd73a06f727fb82c4eda26c3e148cc
parentf7c02bf438f74ce4c7a8fb0c79cd435d85a795be
crypto: s390 - Fix aes-xts parameter corruption

commit 9dda2769af4f3f3093434648c409bb351120d9e8 upstream.

Some s390 crypto algorithms incorrectly use the crypto_tfm structure to
store private data. As the tfm can be shared among multiple threads, this
can result in data corruption.

This patch fixes aes-xts by moving the xts and pcc parameter blocks from
the tfm onto the stack (48 + 96 bytes).

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/crypto/aes_s390.c