summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-18 17:51:25 +0100
committerOctavian Purdila <octavian.purdila@nxp.com>2017-02-23 15:20:41 +0200
commit7e2b528c78ea7dd67e850152be6f38ad83a422a7 (patch)
tree7f9519cb3b1933777d81192e7cb8626b6623685c /drivers/crypto
parent6bd8d3dbd206debb6b17a7b4a110ef74f30f861c (diff)
MLK-12312: CAAM hash algorithms fail registration during initialization
Fix cherry-picked from 5ec908319ab53072d3a2188e62ed2e5d7b846951 crypto: caam - only export the state we really need to export Avoid exporting lots of state by only exporting what we really require, which is the buffer containing the set of pending bytes to be hashed, number of pending bytes, the context buffer, and the function pointer state. This reduces down the exported state size to 216 bytes from 576 bytes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/caamhash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index a59ddd815dcd..20c3b07ab0cd 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -2053,8 +2053,9 @@ static struct caam_hash_template driver_hash[] = {
.setkey = axcbc_setkey,
.halg = {
.digestsize = XCBC_MAC_DIGEST_SIZE,
- },
+ .statesize = sizeof(struct caam_export_state),
},
+ },
.alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_XCBC_MAC,
.alg_op = OP_ALG_ALGSEL_AES,
},