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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 25 Jan 2016 14:39:03 +0000 (22:39 +0800)
commit952bce9792e6bf36fda09c2e5718abb5d9327369
tree359ceba8c362fe0c6bb73ddf15a377a5cc8f824d
parent624144a7eb2c9abcf76722d29f983cdf9801bb2e
crypto: ccp - Add hash state import and export support

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