Re: [PATCH v2 1/2] lib/crypto: blake2s: include as built-in
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-12-24 13:35:35
Also in:
linux-kbuild, lkml
On Thu, Dec 23, 2021 at 03:11:12PM +0100, Jason A. Donenfeld wrote:
In preparation for using blake2s in the RNG, we change the way that it is wired-in to the build system. Instead of kconfig mazes and ifdefs, we use weak symbols, so that an arch version can override the generic version. Then we include the generic version in lib-y, so that it can be removed from the image if the arch version doesn't fallback to it (as is the case on arm though not x86). The result should be a bit simpler and smaller than the code it replaces. Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: linux-kbuild@vger.kernel.org Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: linux-crypto@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- Herbert - I intend to take this via the crng/random.git tree, since it forms a dependency and I'd like to send a pull early in 5.17 cycle. Makefile | 2 +- arch/arm/crypto/Kconfig | 3 +-- arch/arm/crypto/blake2s-core.S | 8 ++++---- arch/arm/crypto/blake2s-glue.c | 6 +++--- arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - arch/x86/crypto/blake2s-glue.c | 11 +++++------ crypto/Kconfig | 5 +---- drivers/net/Kconfig | 1 - include/crypto/internal/blake2s.h | 6 +++--- lib/Makefile | 2 +- lib/crypto/Kconfig | 25 ------------------------- lib/crypto/Makefile | 7 +++---- lib/crypto/blake2s-generic.c | 6 +++++- lib/crypto/blake2s.c | 6 ------ 15 files changed, 27 insertions(+), 63 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>