Skip to content

Commit 37b33c6

Browse files
committed
Merge tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull CRC updates from Eric Biggers: - Reorganize the architecture-optimized CRC32 and CRC-T10DIF code to be directly accessible via the library API, instead of requiring the crypto API. This is much simpler and more efficient. - Convert some users such as ext4 to use the CRC32 library API instead of the crypto API. More conversions like this will come later. - Add a KUnit test that tests and benchmarks multiple CRC variants. Remove older, less-comprehensive tests that are made redundant by this. - Add an entry to MAINTAINERS for the kernel's CRC library code. I'm volunteering to maintain it. I have additional cleanups and optimizations planned for future cycles. * tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: (31 commits) MAINTAINERS: add entry for CRC library powerpc/crc: delete obsolete crc-vpmsum_test.c lib/crc32test: delete obsolete crc32test.c lib/crc16_kunit: delete obsolete crc16_kunit.c lib/crc_kunit.c: add KUnit test suite for CRC library functions powerpc/crc-t10dif: expose CRC-T10DIF function through lib arm64/crc-t10dif: expose CRC-T10DIF function through lib arm/crc-t10dif: expose CRC-T10DIF function through lib x86/crc-t10dif: expose CRC-T10DIF function through lib crypto: crct10dif - expose arch-optimized lib function lib/crc-t10dif: add support for arch overrides lib/crc-t10dif: stop wrapping the crypto API scsi: target: iscsi: switch to using the crc32c library f2fs: switch to using the crc32 library jbd2: switch to using the crc32c library ext4: switch to using the crc32c library lib/crc32: make crc32c() go directly to lib bcachefs: Explicitly select CRYPTO from BCACHEFS_FS x86/crc32: expose CRC32 functions through lib x86/crc32: update prototype for crc32_pclmul_le_16() ...
2 parents 9cb2bf5 + 72914fa commit 37b33c6

File tree

132 files changed

+2035
-4555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+2035
-4555
lines changed

MAINTAINERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6092,6 +6092,17 @@ S: Maintained
60926092
F: Documentation/filesystems/cramfs.rst
60936093
F: fs/cramfs/
60946094

6095+
CRC LIBRARY
6096+
M: Eric Biggers <ebiggers@kernel.org>
6097+
R: Ard Biesheuvel <ardb@kernel.org>
6098+
L: linux-crypto@vger.kernel.org
6099+
S: Maintained
6100+
T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc-next
6101+
F: Documentation/staging/crc*
6102+
F: arch/*/lib/crc*
6103+
F: include/linux/crc*
6104+
F: lib/crc*
6105+
60956106
CREATIVE SB0540
60966107
M: Bastien Nocera <hadess@hadess.net>
60976108
L: linux-input@vger.kernel.org

arch/arm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ config ARM
77
select ARCH_HAS_BINFMT_FLAT
88
select ARCH_HAS_CPU_CACHE_ALIASING
99
select ARCH_HAS_CPU_FINALIZE_INIT if MMU
10+
select ARCH_HAS_CRC32 if KERNEL_MODE_NEON
11+
select ARCH_HAS_CRC_T10DIF if KERNEL_MODE_NEON
1012
select ARCH_HAS_CURRENT_STACK_POINTER
1113
select ARCH_HAS_DEBUG_VIRTUAL if MMU
1214
select ARCH_HAS_DMA_ALLOC if MMU

arch/arm/configs/milbeaut_m10v_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ CONFIG_CRYPTO_AES_ARM=m
107107
CONFIG_CRYPTO_AES_ARM_BS=m
108108
CONFIG_CRYPTO_AES_ARM_CE=m
109109
CONFIG_CRYPTO_CHACHA20_NEON=m
110-
CONFIG_CRYPTO_CRC32_ARM_CE=m
111110
# CONFIG_CRYPTO_HW is not set
112111
CONFIG_CRC_CCITT=m
113112
CONFIG_CRC_ITU_T=m

arch/arm/configs/multi_v7_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,6 @@ CONFIG_CRYPTO_AES_ARM=m
13061306
CONFIG_CRYPTO_AES_ARM_BS=m
13071307
CONFIG_CRYPTO_AES_ARM_CE=m
13081308
CONFIG_CRYPTO_CHACHA20_NEON=m
1309-
CONFIG_CRYPTO_CRC32_ARM_CE=m
13101309
CONFIG_CRYPTO_DEV_SUN4I_SS=m
13111310
CONFIG_CRYPTO_DEV_FSL_CAAM=m
13121311
CONFIG_CRYPTO_DEV_EXYNOS_RNG=m

arch/arm/crypto/Kconfig

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -222,30 +222,5 @@ config CRYPTO_CHACHA20_NEON
222222
Architecture: arm using:
223223
- NEON (Advanced SIMD) extensions
224224

225-
config CRYPTO_CRC32_ARM_CE
226-
tristate "CRC32C and CRC32"
227-
depends on KERNEL_MODE_NEON
228-
depends on CRC32
229-
select CRYPTO_HASH
230-
help
231-
CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
232-
and CRC32 CRC algorithm (IEEE 802.3)
233-
234-
Architecture: arm using:
235-
- CRC and/or PMULL instructions
236-
237-
Drivers: crc32-arm-ce and crc32c-arm-ce
238-
239-
config CRYPTO_CRCT10DIF_ARM_CE
240-
tristate "CRCT10DIF"
241-
depends on KERNEL_MODE_NEON
242-
depends on CRC_T10DIF
243-
select CRYPTO_HASH
244-
help
245-
CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
246-
247-
Architecture: arm using:
248-
- PMULL (Polynomial Multiply Long) instructions
249-
250225
endmenu
251226

arch/arm/crypto/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
2020
obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
2121
obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
2222
obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
23-
obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
24-
obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
2523

2624
aes-arm-y := aes-cipher-core.o aes-cipher-glue.o
2725
aes-arm-bs-y := aes-neonbs-core.o aes-neonbs-glue.o
@@ -37,8 +35,6 @@ sha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o
3735
sha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o
3836
aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o
3937
ghash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o
40-
crct10dif-arm-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o
41-
crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
4238
chacha-neon-y := chacha-scalar-core.o chacha-glue.o
4339
chacha-neon-$(CONFIG_KERNEL_MODE_NEON) += chacha-neon-core.o
4440
poly1305-arm-y := poly1305-core.o poly1305-glue.o

arch/arm/crypto/crc32-ce-glue.c

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)