crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h
authorEric Biggers <ebiggers@google.com>
Sat, 2 May 2020 18:24:26 +0000 (11:24 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 May 2020 05:32:17 +0000 (15:32 +1000)
<linux/cryptohash.h> sounds very generic and important, like it's the
header to include if you're doing cryptographic hashing in the kernel.
But actually it only includes the library implementation of the SHA-1
compression function (not even the full SHA-1).  This should basically
never be used anymore; SHA-1 is no longer considered secure, and there
are much better ways to do cryptographic hashing in the kernel.

Most files that include this header don't actually need it.  So in
preparation for removing it, remove all these unneeded includes of it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
29 files changed:
arch/arm/crypto/sha1_glue.c
arch/arm/crypto/sha1_neon_glue.c
arch/arm/crypto/sha256_glue.c
arch/arm/crypto/sha256_neon_glue.c
arch/arm/kernel/armksyms.c
arch/arm64/crypto/sha256-glue.c
arch/arm64/crypto/sha512-glue.c
arch/microblaze/kernel/microblaze_ksyms.c
arch/mips/cavium-octeon/crypto/octeon-md5.c
arch/powerpc/crypto/md5-glue.c
arch/powerpc/crypto/sha1-spe-glue.c
arch/powerpc/crypto/sha256-spe-glue.c
arch/sparc/crypto/md5_glue.c
arch/sparc/crypto/sha1_glue.c
arch/sparc/crypto/sha256_glue.c
arch/sparc/crypto/sha512_glue.c
arch/unicore32/kernel/ksyms.c
arch/x86/crypto/sha1_ssse3_glue.c
arch/x86/crypto/sha256_ssse3_glue.c
arch/x86/crypto/sha512_ssse3_glue.c
drivers/crypto/atmel-sha.c
drivers/crypto/chelsio/chcr_algo.c
drivers/crypto/chelsio/chcr_ipsec.c
drivers/crypto/omap-sham.c
fs/f2fs/hash.c
include/net/tcp.h
lib/crypto/chacha.c
net/core/secure_seq.c
net/ipv6/seg6_hmac.c

index c80b0ebfd02ff65cbf10ca3b3d504b0aa21231b3..4e954b3f7ecd5d33749e84746951ec3cf04a1c54 100644 (file)
@@ -14,7 +14,6 @@
 #include <crypto/internal/hash.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 #include <crypto/sha1_base.h>
index 2c3627334335df111c3da38f809aa6bc87ff5cf2..0071e5e4411a241ed314008222e2105188c77ee8 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 #include <crypto/sha1_base.h>
index 215497f011f2393461d3e297d78c7fd2ef2ad70f..b8a4f79020cf8a14ae49c05dc241d1eceb55990a 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <crypto/sha.h>
index 38645e415196e6559eacf4426ccf8e261e9402e7..79820b9e2541de89cd19f79731d47783e42d383f 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <crypto/internal/hash.h>
 #include <crypto/internal/simd.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <crypto/sha.h>
index 98bdea51089d59bd980725a63da030ace79bd1c4..82e96ac836849cf1be8d200ce7bf1d3b009173ca 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/export.h>
 #include <linux/sched.h>
 #include <linux/string.h>
-#include <linux/cryptohash.h>
 #include <linux/delay.h>
 #include <linux/in6.h>
 #include <linux/syscalls.h>
index ddf4a0d85c1c2083a3fff1fe485a70a4bae2a79b..77bc6e72abae9457af778dc48c4eecca8f54611c 100644 (file)
@@ -12,7 +12,6 @@
 #include <crypto/internal/simd.h>
 #include <crypto/sha.h>
 #include <crypto/sha256_base.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <linux/string.h>
 
index 78d3083de6b7339ad3ee06d57028ce1331133bd0..370ccb29602fda88772f8941f08d7a86e9bfe1d3 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include <crypto/internal/hash.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <crypto/sha.h>
index 92e12c2c2ec1f758b4674b6aa56be987a2018594..51c43ee5e380bbf5609fa07c6e8006c542ea7e4a 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <linux/export.h>
 #include <linux/string.h>
-#include <linux/cryptohash.h>
 #include <linux/delay.h>
 #include <linux/in6.h>
 #include <linux/syscalls.h>
index d1ed066e1a17790970a641fb542b26c831e02667..8c8ea139653ed3830ec47cbc5bdf442f0730559d 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <asm/byteorder.h>
-#include <linux/cryptohash.h>
 #include <asm/octeon/octeon.h>
 #include <crypto/internal/hash.h>
 
index 7d1bf2fcf668961adecd51a16a7b295898fbbe65..c24f605033bdb336e9350d3149f8ea33daf700cb 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/md5.h>
 #include <asm/byteorder.h>
index 6379990bd6044e4992978d1b1bb4550fc85de4dc..cb57be4ada61cdce3b2e267fd3b40b288652d86b 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 #include <asm/byteorder.h>
index 84939e563b817ef1206d3ab7f69562a881eee8d0..ceb0b6c980b3bb31e9f4e43618cebb5350709aa6 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 #include <asm/byteorder.h>
index 14f6c15be6aecda043fb1733a32cd9922dc0c1cf..111283fe837e8d3fcc598757496910f91cb9390a 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/md5.h>
 
index 7c16663044417c9bd5fa01b0484a86fa90a1bde6..dc017782be523d000aac2d10e0ace71584fbeaaa 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 
index f403ce9ba6e4f37586819550e5080227f3e71d24..286bc8ecf15b6ffbb8ed7cbb32e60d8d0da33f00 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 
index a3b532e43c074e2f426f672949602f9ae3daa725..3b2ca732ff7a5a3b63d5a15c5afd97209d3a40e2 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 
index f4b84872d6403471c5bed0e61235957ebada5aa8..7314450089320af7c870746757860b5eb951fd16 100644 (file)
@@ -9,7 +9,6 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/string.h>
-#include <linux/cryptohash.h>
 #include <linux/delay.h>
 #include <linux/in6.h>
 #include <linux/syscalls.h>
index a801ffc10cbbf71263ec359c88fcbdfc6036c82e..18200135603fc9598075b7aed5d8e3069c149138 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 #include <crypto/sha1_base.h>
index 6394b5fe8db6da51f8c58c8a59682c154ab9f2dc..dd06249229e169629ba65411a99ca2d488b72686 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
 #include <crypto/sha256_base.h>
index 82cc1b3ced1dbe6df5569d7065b0fda2ff1df9bf..b0b05c93409e1600ec7ef3098eb74060b7432981 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/cryptohash.h>
 #include <linux/string.h>
 #include <linux/types.h>
 #include <crypto/sha.h>
index e536e2a6bbd8536395a9dc1e1a4bab52232b9e8d..75ccf41a7cb97a2584b525dffbd61ec7ae1383cb 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/of_device.h>
 #include <linux/delay.h>
 #include <linux/crypto.h>
-#include <linux/cryptohash.h>
 #include <crypto/scatterwalk.h>
 #include <crypto/algapi.h>
 #include <crypto/sha.h>
index 5d3000fdd5f44c31f3dc6d14e308be0bc5559ad4..caf1136e7ef98b092068dd5425c7dce8a4adb92b 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/crypto.h>
-#include <linux/cryptohash.h>
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
 #include <linux/highmem.h>
index 9fd3b9d1ec2f5d54379542f56927c6152e15d644..25bf6d963066d17d3cb9e7ec6b9bdeeb7120c389 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/crypto.h>
-#include <linux/cryptohash.h>
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
 #include <linux/highmem.h>
index d600c5b3fdd3f6768dabb0e89b5ed062e932e0b8..063ad5d03f333cfa999455b841899c4170f49d6a 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/of_irq.h>
 #include <linux/delay.h>
 #include <linux/crypto.h>
-#include <linux/cryptohash.h>
 #include <crypto/scatterwalk.h>
 #include <crypto/algapi.h>
 #include <crypto/sha.h>
index 5bc4dcd8fc03fbbb97ece6233c925634dc972fa8..8c4ea5003ef8cb7b50081590ea2ed07c91f5236b 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/types.h>
 #include <linux/fs.h>
 #include <linux/f2fs_fs.h>
-#include <linux/cryptohash.h>
 #include <linux/pagemap.h>
 #include <linux/unicode.h>
 
index 5fa9eacd965a4abd6a4dd5262fa0d439aa9fe64e..5948c8e4c9e1332c3a3b89d96523b4a9ea16802c 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/cache.h>
 #include <linux/percpu.h>
 #include <linux/skbuff.h>
-#include <linux/cryptohash.h>
 #include <linux/kref.h>
 #include <linux/ktime.h>
 
index 65ead6b0c7e000293a34320dbbc640d2b71d0a9c..4ccbec442469c30a4fed329852fb421e7dd57c20 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/export.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
-#include <linux/cryptohash.h>
 #include <asm/unaligned.h>
 #include <crypto/chacha.h>
 
index 7b6b1d2c3d10913ef1ce35c3b67dd76d195273e5..b5bc680d475536de6da68a9a8815691cf81176a6 100644 (file)
@@ -5,7 +5,6 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/cryptohash.h>
 #include <linux/module.h>
 #include <linux/cache.h>
 #include <linux/random.h>
index ffcfcd2b128f3ae9c6e6964d3e36d95014828858..85dddfe3a2c6ed61fc152be01946e818f4e250a9 100644 (file)
@@ -34,7 +34,6 @@
 #include <net/addrconf.h>
 #include <net/xfrm.h>
 
-#include <linux/cryptohash.h>
 #include <crypto/hash.h>
 #include <crypto/sha.h>
 #include <net/seg6.h>