]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:12:43 +0000 (09:12 -0700)
commitf88e797b46f72a05c0ee7bce648c9bb851671eec
treea20abc4526f9062b68f3c55e1b27edb6d9f60313
parent9bdb0027b4a9eca2c056bf84c292a903095e9be9
crypto: ccp - Add hash state import and export support

commit 952bce9792e6bf36fda09c2e5718abb5d9327369 upstream.

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.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c