Commit 37b33c68 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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()
  ...
parents 9cb2bf59 72914fae
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -6092,6 +6092,17 @@ S: Maintained
F:	Documentation/filesystems/cramfs.rst
F:	fs/cramfs/
CRC LIBRARY
M:	Eric Biggers <ebiggers@kernel.org>
R:	Ard Biesheuvel <ardb@kernel.org>
L:	linux-crypto@vger.kernel.org
S:	Maintained
T:	git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc-next
F:	Documentation/staging/crc*
F:	arch/*/lib/crc*
F:	include/linux/crc*
F:	lib/crc*
CREATIVE SB0540
M:	Bastien Nocera <hadess@hadess.net>
L:	linux-input@vger.kernel.org
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ config ARM
	select ARCH_HAS_BINFMT_FLAT
	select ARCH_HAS_CPU_CACHE_ALIASING
	select ARCH_HAS_CPU_FINALIZE_INIT if MMU
	select ARCH_HAS_CRC32 if KERNEL_MODE_NEON
	select ARCH_HAS_CRC_T10DIF if KERNEL_MODE_NEON
	select ARCH_HAS_CURRENT_STACK_POINTER
	select ARCH_HAS_DEBUG_VIRTUAL if MMU
	select ARCH_HAS_DMA_ALLOC if MMU
+0 −1
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ CONFIG_CRYPTO_AES_ARM=m
CONFIG_CRYPTO_AES_ARM_BS=m
CONFIG_CRYPTO_AES_ARM_CE=m
CONFIG_CRYPTO_CHACHA20_NEON=m
CONFIG_CRYPTO_CRC32_ARM_CE=m
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_CCITT=m
CONFIG_CRC_ITU_T=m
+0 −1
Original line number Diff line number Diff line
@@ -1306,7 +1306,6 @@ CONFIG_CRYPTO_AES_ARM=m
CONFIG_CRYPTO_AES_ARM_BS=m
CONFIG_CRYPTO_AES_ARM_CE=m
CONFIG_CRYPTO_CHACHA20_NEON=m
CONFIG_CRYPTO_CRC32_ARM_CE=m
CONFIG_CRYPTO_DEV_SUN4I_SS=m
CONFIG_CRYPTO_DEV_FSL_CAAM=m
CONFIG_CRYPTO_DEV_EXYNOS_RNG=m
+0 −25
Original line number Diff line number Diff line
@@ -222,30 +222,5 @@ config CRYPTO_CHACHA20_NEON
	  Architecture: arm using:
	  - NEON (Advanced SIMD) extensions

config CRYPTO_CRC32_ARM_CE
	tristate "CRC32C and CRC32"
	depends on KERNEL_MODE_NEON
	depends on CRC32
	select CRYPTO_HASH
	help
	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
	  and CRC32 CRC algorithm (IEEE 802.3)

	  Architecture: arm using:
	  - CRC and/or PMULL instructions

	  Drivers: crc32-arm-ce and crc32c-arm-ce

config CRYPTO_CRCT10DIF_ARM_CE
	tristate "CRCT10DIF"
	depends on KERNEL_MODE_NEON
	depends on CRC_T10DIF
	select CRYPTO_HASH
	help
	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)

	  Architecture: arm using:
	  - PMULL (Polynomial Multiply Long) instructions

endmenu
Loading