[Devel] [PATCH vz10] configs: Build CONFIG_CRYPTO_CRC32C_INTEL in, not as a module
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Sep 14 20:51:19 MSK 2026
lib/libcrc32c.c binds a static tfm once, in libcrc32c_mod_init(), a
device_initcall that runs early at boot. With CRYPTO_CRC32C_INTEL=m the
accelerated driver has not registered yet, so the tfm binds to
crc32c-generic and keeps it: loading the module later cannot rebind it,
it just sits there unused. Every crc32c() caller then runs the software
crc32_body path instead of the CPU's CRC32 instruction, which lands on
every ext4/xfs/btrfs/nvme/dm-integrity checksum.
Building the driver in makes its initcall run before
libcrc32c_mod_init(), since arch/x86/ links before lib/ and both are
device_initcall. The tfm then binds to crc32c-intel from the first
allocation.
This does not remove the crypto shash wrapper crc32c() still goes
through; a direct arch-dispatch implementation would still be faster.
https://virtuozzo.atlassian.net/browse/VSTOR-145125
Feature: crc32c: hardware-accelerated checksum
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL | 1 +
1 file changed, 1 insertion(+)
diff --git a/redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL b/redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL
new file mode 100644
index 0000000000000..d4f84f727c85c
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/CONFIG_CRYPTO_CRC32C_INTEL
@@ -0,0 +1 @@
+CONFIG_CRYPTO_CRC32C_INTEL=y
---
base-commit: ef994d2c62a1d045543fe80aaf584139b22fbaf7
change-id: 20260914-temp2-fe6929d95c5d
Best regards,
--
Konstantin Khorenko <khorenko at virtuozzo.com>
More information about the Devel
mailing list