]> git.baikalelectronics.ru Git - kernel.git/commit
lib/string: Make memzero_explicit() inline instead of external
authorArvind Sankar <nivedita@alum.mit.edu>
Mon, 7 Oct 2019 22:00:02 +0000 (18:00 -0400)
committerIngo Molnar <mingo@kernel.org>
Tue, 8 Oct 2019 11:27:05 +0000 (13:27 +0200)
commit2ce4d337b59683cd544749cdf1849969d46f51a1
tree6e18458897b6246afc04242d3e38dcaf032e366c
parentc8dd4c13cdff9d85c1d0f0d6f62a5a364dd4bed5
lib/string: Make memzero_explicit() inline instead of external

With the use of the barrier implied by barrier_data(), there is no need
for memzero_explicit() to be extern. Making it inline saves the overhead
of a function call, and allows the code to be reused in arch/*/purgatory
without having to duplicate the implementation.

Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H . Peter Anvin <hpa@zytor.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephan Mueller <smueller@chronox.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-crypto@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Fixes: 808264e6fca7 ("crypto: sha256 - Use get/put_unaligned_be32 to get input, memzero_explicit")
Link: https://lkml.kernel.org/r/20191007220000.GA408752@rani.riverdale.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/string.h
lib/string.c