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@xxxxxxxxxx> > Cc: Masahiro Yamada <masahiroy@xxxxxxxxxx> > Cc: linux-kbuild@xxxxxxxxxxxxxxx > Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Cc: linux-crypto@xxxxxxxxxxxxxxx > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxxx>