crypto: hifn_795x - Remove the hifn_795x driver
Subsystems (2)
PATCH 1/1 crypto: hifn_795x - Remove the hifn_795x driver
Remove the hifn_795x driver, for many reasons:
- It supported only obsolete, early 2000s PCI chips; only legacy algorithms (DES, 3DES, AES in ECB and CBC modes); and only !ARCH_DMA_ADDR_T_64BIT kernels (e.g., no 64-bit or PAE/LPAE kernels).
- The last commit tested on hardware was in 2008. Every commit since then has been an API migration, cleanup, build fix, or static checker fix. It's clear that no one actually uses it.
- The only defconfig that enables it is ppc6xx_defconfig, which is a big-endian platform where the driver is completely broken (as it has an undeclared little-endian assumption).
- It has a large number of bugs, and there's no chance that it passes the crypto self-tests. For example:
- Streaming DMA mappings are never unmapped. Every crypto operation leaks DMA mappings. Pages can be leaked on error as well.
- Scatterlists are walked using raw pointer arithmetic, breaking chained scatterlists. The scatterlist element coalescing logic is also buggy and can generate corrupted destination DMA descriptors.
- It BUG()s if passed more than PAGE_SIZE of misaligned data.
- hifn_rng_data_present() has inverted logic: it reports data as being ready before the required delay has elapsed.
- ecb(aes) and cbc(aes) fail to validate the AES key length.
- cbc(des3_ede) considers the IV to be 24 bytes rather than 8.
- DES weak key checks are run on AES keys.
- All algorithms fail to reject non-block-multiple lengths.
- All CBC algorithms fail to return the next IV.
And of course, AI tools can easily find these issues in this unused and untested code, resulting in pointless fixes. Just remove it instead.
--- arch/powerpc/configs/ppc6xx_defconfig | 2 - drivers/crypto/Kconfig | 17 - drivers/crypto/Makefile | 1 - drivers/crypto/hifn_795x.c | 2560 ------------------------- 4 files changed, 2580 deletions(-) delete mode 100644 drivers/crypto/hifn_795x.c
arch/powerpc/configs/ppc6xx_defconfig +0 -2
@@ -1060,7 +1060,5 @@ CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_LZO=m -CONFIG_CRYPTO_DEV_HIFN_795X=m -CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y CONFIG_CRYPTO_DEV_TALITOS=m CONFIG_VIRTUALIZATION=y
drivers/crypto/Kconfig +0 -17
@@ -235,23 +235,6 @@ config CRYPTO_DEV_SL3516_DEBUG This will create /sys/kernel/debug/sl3516/stats for displaying the number of requests per algorithm and other internal stats. -config CRYPTO_DEV_HIFN_795X - tristate "Driver HIFN 795x crypto accelerator chips" - select CRYPTO_LIB_DES - select CRYPTO_SKCIPHER - select HW_RANDOM if CRYPTO_DEV_HIFN_795X_RNG - depends on PCI - depends on !ARCH_DMA_ADDR_T_64BIT - help - This option allows you to have support for HIFN 795x crypto adapters. - -config CRYPTO_DEV_HIFN_795X_RNG - bool "HIFN 795x random number generator" - depends on CRYPTO_DEV_HIFN_795X - help - Select this option if you want to enable the random number generator - on the HIFN 795x crypto adapters. - source "drivers/crypto/caam/Kconfig" config CRYPTO_DEV_TALITOS
drivers/crypto/Makefile +0 -1
@@ -13,7 +13,6 @@ obj-$(CONFIG_CRYPTO_DEV_CCREE) += ccree/ obj-$(CONFIG_CRYPTO_DEV_CHELSIO) += chelsio/ obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON) += caam/ obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o -obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o obj-$(CONFIG_CRYPTO_DEV_MARVELL) += marvell/ obj-$(CONFIG_CRYPTO_DEV_MXS_DCP) += mxs-dcp.o
drivers/crypto/hifn_795x.c deleted +0 -2560
2,560 lines not on this page · raw message
base-commit: 8ba9044ff0bf4a5789216496019fad614eeafd45
Signature · 1 line
2.56.1