]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccp - Add hash state import and export support
authorTom Lendacky <thomas.lendacky@amd.com>
Tue, 12 Jan 2016 17:17:38 +0000 (11:17 -0600)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 18 Apr 2016 12:50:32 +0000 (08:50 -0400)
commit1ad241d40ef8d9a50ced5c35bf55e9a21a997516
tree2de8036c45f22a38c8ed83fa9e5b241ae9007f4a
parent05d13aa39e8c81ad8c4af8dcc3c29129f5634b8a
crypto: ccp - Add hash state import and export support

[ Upstream commit 952bce9792e6bf36fda09c2e5718abb5d9327369 ]

Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
added a check to prevent ahash algorithms from successfully registering
if the import and export functions were not implemented. This prevents
an oops in the hash_accept function of algif_hash. This commit causes
the ccp-crypto module SHA support and AES CMAC support from successfully
registering and causing the ccp-crypto module load to fail because the
ahash import and export functions are not implemented.

Update the CCP Crypto API support to provide import and export support
for ahash algorithms.

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>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c