]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: hash - Use memzero_explicit() for clearing state
authorArvind Sankar <nivedita@alum.mit.edu>
Sun, 25 Oct 2020 14:31:15 +0000 (10:31 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Oct 2020 06:35:03 +0000 (17:35 +1100)
commita53893391391fc1f0a30cfaab9fe5723398ea02c
treeb51f08386220bcd60c1a909f73f36233057acfe2
parentc7a25264078cb0969441c69f8310514c1eb7de82
crypto: hash - Use memzero_explicit() for clearing state

Without the barrier_data() inside memzero_explicit(), the compiler may
optimize away the state-clearing if it can tell that the state is not
used afterwards.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/ghash-ce-glue.c
arch/arm64/crypto/poly1305-glue.c
arch/arm64/crypto/sha3-ce-glue.c
arch/x86/crypto/poly1305_glue.c
include/crypto/sha1_base.h
include/crypto/sha256_base.h
include/crypto/sha512_base.h
include/crypto/sm3_base.h