diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-05-06 15:54:32 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-07 05:16:26 +0200 |
commit | ec59a65d694e5fd99d76565b93468c99ae8dff79 (patch) | |
tree | 1281e41e9d1b3e6e1847507774491632df582c8c /arch/arm64/crypto | |
parent | crypto: arm64/sha1-ce - prevent asm code finalization in final() path (diff) | |
download | linux-ec59a65d694e5fd99d76565b93468c99ae8dff79.tar.xz linux-ec59a65d694e5fd99d76565b93468c99ae8dff79.zip |
crypto: arm64/sha2-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/arm64/crypto')
-rw-r--r-- | arch/arm64/crypto/sha2-ce-glue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/crypto/sha2-ce-glue.c b/arch/arm64/crypto/sha2-ce-glue.c index 1340e44c048b..7cd587564a41 100644 --- a/arch/arm64/crypto/sha2-ce-glue.c +++ b/arch/arm64/crypto/sha2-ce-glue.c @@ -75,6 +75,9 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data, static int sha256_ce_final(struct shash_desc *desc, u8 *out) { + struct sha256_ce_state *sctx = shash_desc_ctx(desc); + + sctx->finalize = 0; kernel_neon_begin_partial(28); sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform); kernel_neon_end(); |