[PATCH v2 7/8] lib: Give compression, checksum, crypto config opts names

Kent Overstreet
2025-10-12T21:24:31Z

Give these config options names so that they show up under the "Library
routines" kernel configuration menu, and can be enabled by
distributions.

These are needed for bcachefs to be built out of tree.

Most (but not all, notably CRC64) of these libraries have crypto API
wrappers which are already selectable under the "Cryptographic API"
configuration menu; however, Eric Biggers has been working to reduce
usage of the cryptographic API in favor of much more lightweight direct
APIs.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
lib/Kconfig | 16 ++++++++--------
lib/crc/Kconfig | 4 ++--
lib/crypto/Kconfig | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/Kconfig b/lib/Kconfig
index e831f4462453..eb3b6b96b303 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -142,7 +142,7 @@ source "lib/crc/Kconfig"
source "lib/crypto/Kconfig"

config XXHASH
- tristate
+ tristate "XXHASH checksum algorithm"

config AUDIT_GENERIC
bool
@@ -176,10 +176,10 @@ config 842_DECOMPRESS
tristate

config ZLIB_INFLATE
- tristate
+ tristate "Zlib decompression"

config ZLIB_DEFLATE
- tristate
+ tristate "Zlib compression"
select BITREVERSE

config ZLIB_DFLTCC
@@ -196,13 +196,13 @@ config LZO_DECOMPRESS
tristate

config LZ4_COMPRESS
- tristate
+ tristate "LZ4 compression"

config LZ4HC_COMPRESS
- tristate
+ tristate "LZ4HC compression"

config LZ4_DECOMPRESS
- tristate
+ tristate "LZC decompression"

config ZSTD_COMMON
select XXHASH
@@ -210,11 +210,11 @@ config ZSTD_COMMON

config ZSTD_COMPRESS
select ZSTD_COMMON
- tristate
+ tristate "ZSTD compression"

config ZSTD_DECOMPRESS
select ZSTD_COMMON
- tristate
+ tristate "ZSTD decompression"

source "lib/xz/Kconfig"

diff --git a/lib/crc/Kconfig b/lib/crc/Kconfig
index 70e7a6016de3..3a3d6290211b 100644
--- a/lib/crc/Kconfig
+++ b/lib/crc/Kconfig
@@ -54,7 +54,7 @@ config CRC_T10DIF_ARCH
default y if X86

config CRC32
- tristate
+ tristate "CRC32 algorithm"
select BITREVERSE
help
The CRC32 library functions. Select this if your module uses any of
@@ -74,7 +74,7 @@ config CRC32_ARCH
default y if X86

config CRC64
- tristate
+ tristate "CRC64 algorithm"
help
The CRC64 library functions. Select this if your module uses any of
the functions from <linux/crc64.h>.
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index 1e6b008f8fca..51e4e8d3b793 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -62,7 +62,7 @@ config CRYPTO_LIB_CHACHA_GENERIC
enabled, this implementation serves the users of CRYPTO_LIB_CHACHA.

config CRYPTO_LIB_CHACHA
- tristate
+ tristate "Chacha encryption algorithm"
help
Enable the ChaCha library interface. This interface may be fulfilled
by either the generic implementation or an arch-specific one, if one
@@ -125,7 +125,7 @@ config CRYPTO_LIB_POLY1305_GENERIC
enabled, this implementation serves the users of CRYPTO_LIB_POLY1305.

config CRYPTO_LIB_POLY1305
- tristate
+ tristate "Poly1305 authentication algorithm"
help
Enable the Poly1305 library interface. This interface may be fulfilled
by either the generic implementation or an arch-specific one, if one
--
2.51.0