]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: ccp - Don't assume export/import areas are aligned
authorTom Lendacky <thomas.lendacky@amd.com>
Tue, 2 Feb 2016 17:38:21 +0000 (11:38 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:03 +0000 (15:46 -0700)
commit036375986b0cf3b055086ad8d672a8d4fc18ab0c
tree04ec6784ab0ed60ef7687cb130724c1c5c526c99
parent9491caadcce80a2f501391d1a7a45c56c7465a32
crypto: ccp - Don't assume export/import areas are aligned

Orabug: 23331052

[ Upstream commit b31dde2a5cb1bf764282abf934266b7193c2bc7c ]

Use a local variable for the exported and imported state so that
alignment is not an issue. On export, set a local variable from the
request context and then memcpy the contents of the local variable to
the export memory area. On import, memcpy the import memory area into
a local variable and then use the local variable to set the request
context.

Cc: <stable@vger.kernel.org> # 3.14.x-
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit b053d66b66e702f74ddc986863b30eaac41e7f4c)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c