diff options
author | Kees Cook <keescook@chromium.org> | 2014-11-20 20:05:53 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-24 09:43:57 -0500 |
commit | 5d26a105b5a73e5635eae0629b42fa0a90e07b7b (patch) | |
tree | e1be190c7b5dfc70c57b41f8ecb896dfda7d1e16 /drivers | |
parent | 5d4a5e770d97d87082067886e7097c920b338da5 (diff) |
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/padlock-aes.c | 2 | ||||
-rw-r--r-- | drivers/crypto/padlock-sha.c | 8 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_ctl_drv.c | 3 | ||||
-rw-r--r-- | drivers/crypto/ux500/cryp/cryp_core.c | 4 | ||||
-rw-r--r-- | drivers/crypto/ux500/hash/hash_core.c | 8 | ||||
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 3 |
6 files changed, 15 insertions, 13 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index 633ba945e153..c178ed8c3908 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -563,4 +563,4 @@ MODULE_DESCRIPTION("VIA PadLock AES algorithm support"); | |||
563 | MODULE_LICENSE("GPL"); | 563 | MODULE_LICENSE("GPL"); |
564 | MODULE_AUTHOR("Michal Ludvig"); | 564 | MODULE_AUTHOR("Michal Ludvig"); |
565 | 565 | ||
566 | MODULE_ALIAS("aes"); | 566 | MODULE_ALIAS_CRYPTO("aes"); |
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index bace885634f2..95f7d27ce491 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c | |||
@@ -593,7 +593,7 @@ MODULE_DESCRIPTION("VIA PadLock SHA1/SHA256 algorithms support."); | |||
593 | MODULE_LICENSE("GPL"); | 593 | MODULE_LICENSE("GPL"); |
594 | MODULE_AUTHOR("Michal Ludvig"); | 594 | MODULE_AUTHOR("Michal Ludvig"); |
595 | 595 | ||
596 | MODULE_ALIAS("sha1-all"); | 596 | MODULE_ALIAS_CRYPTO("sha1-all"); |
597 | MODULE_ALIAS("sha256-all"); | 597 | MODULE_ALIAS_CRYPTO("sha256-all"); |
598 | MODULE_ALIAS("sha1-padlock"); | 598 | MODULE_ALIAS_CRYPTO("sha1-padlock"); |
599 | MODULE_ALIAS("sha256-padlock"); | 599 | MODULE_ALIAS_CRYPTO("sha256-padlock"); |
diff --git a/drivers/crypto/qat/qat_common/adf_ctl_drv.c b/drivers/crypto/qat/qat_common/adf_ctl_drv.c index 244d73378f0e..7ee93f881db6 100644 --- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c +++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/cdev.h> | 53 | #include <linux/cdev.h> |
54 | #include <linux/uaccess.h> | 54 | #include <linux/uaccess.h> |
55 | #include <linux/crypto.h> | ||
55 | 56 | ||
56 | #include "adf_accel_devices.h" | 57 | #include "adf_accel_devices.h" |
57 | #include "adf_common_drv.h" | 58 | #include "adf_common_drv.h" |
@@ -487,4 +488,4 @@ module_exit(adf_unregister_ctl_device_driver); | |||
487 | MODULE_LICENSE("Dual BSD/GPL"); | 488 | MODULE_LICENSE("Dual BSD/GPL"); |
488 | MODULE_AUTHOR("Intel"); | 489 | MODULE_AUTHOR("Intel"); |
489 | MODULE_DESCRIPTION("Intel(R) QuickAssist Technology"); | 490 | MODULE_DESCRIPTION("Intel(R) QuickAssist Technology"); |
490 | MODULE_ALIAS("intel_qat"); | 491 | MODULE_ALIAS_CRYPTO("intel_qat"); |
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index 83811aab207e..7c035de9055e 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c | |||
@@ -1812,7 +1812,7 @@ module_exit(ux500_cryp_mod_fini); | |||
1812 | module_param(cryp_mode, int, 0); | 1812 | module_param(cryp_mode, int, 0); |
1813 | 1813 | ||
1814 | MODULE_DESCRIPTION("Driver for ST-Ericsson UX500 CRYP crypto engine."); | 1814 | MODULE_DESCRIPTION("Driver for ST-Ericsson UX500 CRYP crypto engine."); |
1815 | MODULE_ALIAS("aes-all"); | 1815 | MODULE_ALIAS_CRYPTO("aes-all"); |
1816 | MODULE_ALIAS("des-all"); | 1816 | MODULE_ALIAS_CRYPTO("des-all"); |
1817 | 1817 | ||
1818 | MODULE_LICENSE("GPL"); | 1818 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index 5af53b5508b0..76ecc8d143d0 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c | |||
@@ -1997,7 +1997,7 @@ module_exit(ux500_hash_mod_fini); | |||
1997 | MODULE_DESCRIPTION("Driver for ST-Ericsson UX500 HASH engine."); | 1997 | MODULE_DESCRIPTION("Driver for ST-Ericsson UX500 HASH engine."); |
1998 | MODULE_LICENSE("GPL"); | 1998 | MODULE_LICENSE("GPL"); |
1999 | 1999 | ||
2000 | MODULE_ALIAS("sha1-all"); | 2000 | MODULE_ALIAS_CRYPTO("sha1-all"); |
2001 | MODULE_ALIAS("sha256-all"); | 2001 | MODULE_ALIAS_CRYPTO("sha256-all"); |
2002 | MODULE_ALIAS("hmac-sha1-all"); | 2002 | MODULE_ALIAS_CRYPTO("hmac-sha1-all"); |
2003 | MODULE_ALIAS("hmac-sha256-all"); | 2003 | MODULE_ALIAS_CRYPTO("hmac-sha256-all"); |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 99485415dcc2..91e97ec01418 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/hrtimer.h> | 44 | #include <linux/hrtimer.h> |
45 | #include <linux/ktime.h> | 45 | #include <linux/ktime.h> |
46 | #include <asm/facility.h> | 46 | #include <asm/facility.h> |
47 | #include <linux/crypto.h> | ||
47 | 48 | ||
48 | #include "ap_bus.h" | 49 | #include "ap_bus.h" |
49 | 50 | ||
@@ -71,7 +72,7 @@ MODULE_AUTHOR("IBM Corporation"); | |||
71 | MODULE_DESCRIPTION("Adjunct Processor Bus driver, " \ | 72 | MODULE_DESCRIPTION("Adjunct Processor Bus driver, " \ |
72 | "Copyright IBM Corp. 2006, 2012"); | 73 | "Copyright IBM Corp. 2006, 2012"); |
73 | MODULE_LICENSE("GPL"); | 74 | MODULE_LICENSE("GPL"); |
74 | MODULE_ALIAS("z90crypt"); | 75 | MODULE_ALIAS_CRYPTO("z90crypt"); |
75 | 76 | ||
76 | /* | 77 | /* |
77 | * Module parameter | 78 | * Module parameter |