Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ard Biesheuvel and committed by
Herbert Xu
bf7883eb ac02c6ea

+3
+3
arch/arm64/crypto/sha1-ce-glue.c
··· 74 74 75 75 static int sha1_ce_final(struct shash_desc *desc, u8 *out) 76 76 { 77 + struct sha1_ce_state *sctx = shash_desc_ctx(desc); 78 + 79 + sctx->finalize = 0; 77 80 kernel_neon_begin_partial(16); 78 81 sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform); 79 82 kernel_neon_end();