summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-05-06 15:54:31 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-07 11:16:25 +0800
commitbf7883ebcb9c0880b8f5d22c1435a3de15283f0a (patch)
tree52ac12c8913d8c2d24749463cb8a0c56cecd7f96 /arch
parentac02c6ea6b404461829697792cd2b67f6a14d28a (diff)
downloadblackbird-op-linux-bf7883ebcb9c0880b8f5d22c1435a3de15283f0a.tar.gz
blackbird-op-linux-bf7883ebcb9c0880b8f5d22c1435a3de15283f0a.zip
crypto: arm64/sha1-ce - prevent asm code finalization in final() path
Ensure that the asm code finalization path is not triggered when invoked via final(), since it already takes care of that itself. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/crypto/sha1-ce-glue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/crypto/sha1-ce-glue.c b/arch/arm64/crypto/sha1-ce-glue.c
index 114e7cc5de8c..aefda9868627 100644
--- a/arch/arm64/crypto/sha1-ce-glue.c
+++ b/arch/arm64/crypto/sha1-ce-glue.c
@@ -74,6 +74,9 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,
static int sha1_ce_final(struct shash_desc *desc, u8 *out)
{
+ struct sha1_ce_state *sctx = shash_desc_ctx(desc);
+
+ sctx->finalize = 0;
kernel_neon_begin_partial(16);
sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform);
kernel_neon_end();
OpenPOWER on IntegriCloud