public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "crypto: crc32 - remove "_generic" from filenames"
@ 2025-04-28 12:54 Arnd Bergmann
  2025-04-28 16:11 ` Eric Biggers
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-04-28 12:54 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Eric Biggers
  Cc: Arnd Bergmann, linux-crypto, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Each loadable module in the kernel must have a unique name, so renaming
the crc32 crypto module made it conflict with the crc32 library, as
shown by the build failure:

 error: the following would cause module name conflict:
   crypto/crc32.ko
   lib/crc32.ko

This could be solved by renaming one of the two conflicting modules
to something else again. As I can't think of a better name, just
revert back to the previous state as the easiest fix.

Fixes: ce653e0a7e0a ("crypto: crc32 - remove "_generic" from filenames")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 crypto/Makefile                       | 8 ++++----
 crypto/{crc32.c => crc32_generic.c}   | 0
 crypto/{crc32c.c => crc32c_generic.c} | 0
 3 files changed, 4 insertions(+), 4 deletions(-)
 rename crypto/{crc32.c => crc32_generic.c} (100%)
 rename crypto/{crc32c.c => crc32c_generic.c} (100%)

diff --git a/crypto/Makefile b/crypto/Makefile
index f238281b16c0..5d2f2a28d8a0 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -153,10 +153,10 @@ obj-$(CONFIG_CRYPTO_POLY1305) += poly1305.o
 CFLAGS_poly1305.o += -DARCH=$(ARCH)
 obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
 obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
-obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
-obj-$(CONFIG_CRYPTO_CRC32) += crc32.o
-CFLAGS_crc32c.o += -DARCH=$(ARCH)
-CFLAGS_crc32.o += -DARCH=$(ARCH)
+obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o
+obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o
+CFLAGS_crc32c_generic.o += -DARCH=$(ARCH)
+CFLAGS_crc32_generic.o += -DARCH=$(ARCH)
 obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
 obj-$(CONFIG_CRYPTO_KRB5ENC) += krb5enc.o
 obj-$(CONFIG_CRYPTO_LZO) += lzo.o lzo-rle.o
diff --git a/crypto/crc32.c b/crypto/crc32_generic.c
similarity index 100%
rename from crypto/crc32.c
rename to crypto/crc32_generic.c
diff --git a/crypto/crc32c.c b/crypto/crc32c_generic.c
similarity index 100%
rename from crypto/crc32c.c
rename to crypto/crc32c_generic.c
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Revert "crypto: crc32 - remove "_generic" from filenames"
  2025-04-28 12:54 [PATCH] Revert "crypto: crc32 - remove "_generic" from filenames" Arnd Bergmann
@ 2025-04-28 16:11 ` Eric Biggers
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2025-04-28 16:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Herbert Xu, David S. Miller, Arnd Bergmann, linux-crypto,
	linux-kernel

On Mon, Apr 28, 2025 at 02:54:02PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Each loadable module in the kernel must have a unique name, so renaming
> the crc32 crypto module made it conflict with the crc32 library, as
> shown by the build failure:
> 
>  error: the following would cause module name conflict:
>    crypto/crc32.ko
>    lib/crc32.ko
> 
> This could be solved by renaming one of the two conflicting modules
> to something else again. As I can't think of a better name, just
> revert back to the previous state as the easiest fix.
> 
> Fixes: ce653e0a7e0a ("crypto: crc32 - remove "_generic" from filenames")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  crypto/Makefile                       | 8 ++++----
>  crypto/{crc32.c => crc32_generic.c}   | 0
>  crypto/{crc32c.c => crc32c_generic.c} | 0
>  3 files changed, 4 insertions(+), 4 deletions(-)
>  rename crypto/{crc32.c => crc32_generic.c} (100%)
>  rename crypto/{crc32c.c => crc32c_generic.c} (100%)

Dropped the patch, thanks.

lib/crypto/ uses a lib prefix on the lib modules.  We could follow that and do
libcrc32 and crc32.  I think that's a mistake though; nothing else in lib/ does
that, and it would imply that the Crypto API wrapper for crc32 is the "regular"
CRC-32 module and that the lib module is something special.  It's actually the
other way around.  So I'll propose crc32 and crc32-cryptoapi.

- Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-28 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28 12:54 [PATCH] Revert "crypto: crc32 - remove "_generic" from filenames" Arnd Bergmann
2025-04-28 16:11 ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox