]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: lib - make the sha1 library optional
authorEric Biggers <ebiggers@google.com>
Sat, 9 Jul 2022 21:18:49 +0000 (14:18 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Jul 2022 08:43:59 +0000 (16:43 +0800)
commit7a001e4fe7f78bae36866e002e278a9959d117d8
tree45c64f86acc7dac2c6a2087c38787f4ac2ce79f9
parent2c3729e002b59f151baf8c219ebd4e55e351a362
crypto: lib - make the sha1 library optional

Since the Linux RNG no longer uses sha1_transform(), the SHA-1 library
is no longer needed unconditionally.  Make it possible to build the
Linux kernel without the SHA-1 library by putting it behind a kconfig
option, and selecting this new option from the kconfig options that gate
the remaining users: CRYPTO_SHA1 for crypto/sha1_generic.c, BPF for
kernel/bpf/core.c, and IPV6 for net/ipv6/addrconf.c.

Unfortunately, since BPF is selected by NET, for now this can only make
a difference for kernels built without networking support.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
init/Kconfig
lib/crypto/Kconfig
lib/crypto/Makefile
net/ipv6/Kconfig