MLK-12312: CAAM hash algorithms fail registration during initialization

Fix cherry-picked from 5ec908319a

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>
This commit is contained in:
Russell King
2015-10-18 17:51:25 +01:00
committed by Jason Liu
parent 2da6b43960
commit dfcf0caa49

View File

@ -1929,8 +1929,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,
},
};