diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-06-30 10:22:23 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2025-07-08 12:03:44 -0700 |
| commit | aacb37f597d0b50800a233ab2c29c195a1595147 (patch) | |
| tree | 00122a9a4cb092afa56a2a29f9d5747ff45f3e74 | |
| parent | lib/crypto: x86/sha256: Remove unnecessary checks for nblocks==0 (diff) | |
| download | linux-aacb37f597d0b50800a233ab2c29c195a1595147.tar.gz linux-aacb37f597d0b50800a233ab2c29c195a1595147.zip | |
lib/crypto: hash_info: Move hash_info.c into lib/crypto/
crypto/hash_info.c just contains a couple of arrays that map HASH_ALGO_*
algorithm IDs to properties of those algorithms. It is compiled only
when CRYPTO_HASH_INFO=y, but currently CRYPTO_HASH_INFO depends on
CRYPTO. Since this can be useful without the old-school crypto API,
move it into lib/crypto/ so that it no longer depends on CRYPTO.
This eliminates the need for FS_VERITY to select CRYPTO after it's been
converted to use lib/crypto/.
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250630172224.46909-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
| -rw-r--r-- | crypto/Kconfig | 3 | ||||
| -rw-r--r-- | crypto/Makefile | 1 | ||||
| -rw-r--r-- | lib/crypto/Kconfig | 3 | ||||
| -rw-r--r-- | lib/crypto/Makefile | 2 | ||||
| -rw-r--r-- | lib/crypto/hash_info.c (renamed from crypto/hash_info.c) | 0 |
5 files changed, 5 insertions, 4 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 3ea1397214e0..5d4cf022c577 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1422,9 +1422,6 @@ config CRYPTO_USER_API_ENABLE_OBSOLETE endmenu -config CRYPTO_HASH_INFO - bool - if !KMSAN # avoid false positives from assembly if ARM source "arch/arm/crypto/Kconfig" diff --git a/crypto/Makefile b/crypto/Makefile index 5098fa6d5f39..816607e0e78c 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -204,7 +204,6 @@ obj-$(CONFIG_CRYPTO_ECRDSA) += ecrdsa_generic.o obj-$(CONFIG_XOR_BLOCKS) += xor.o obj-$(CONFIG_ASYNC_CORE) += async_tx/ obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += asymmetric_keys/ -obj-$(CONFIG_CRYPTO_HASH_INFO) += hash_info.o crypto_simd-y := simd.o obj-$(CONFIG_CRYPTO_SIMD) += crypto_simd.o diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 3305c6908581..ee7e1e27ea6a 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -2,6 +2,9 @@ menu "Crypto library routines" +config CRYPTO_HASH_INFO + bool + config CRYPTO_LIB_UTILS tristate diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile index a887bf103bf0..533bb1533e19 100644 --- a/lib/crypto/Makefile +++ b/lib/crypto/Makefile @@ -8,6 +8,8 @@ quiet_cmd_perlasm = PERLASM $@ quiet_cmd_perlasm_with_args = PERLASM $@ cmd_perlasm_with_args = $(PERL) $(<) void $(@) +obj-$(CONFIG_CRYPTO_HASH_INFO) += hash_info.o + obj-$(CONFIG_CRYPTO_LIB_UTILS) += libcryptoutils.o libcryptoutils-y := memneq.o utils.o diff --git a/crypto/hash_info.c b/lib/crypto/hash_info.c index 9a467638c971..9a467638c971 100644 --- a/crypto/hash_info.c +++ b/lib/crypto/hash_info.c |
