diff options
| author | Jan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de> | 2016-07-26 15:25:59 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 15:52:24 +0200 |
| commit | 516480c70a5392533c2e3a81863ac02206a66e1b (patch) | |
| tree | c22efa9678c72859bd4f47c40d40e57139fa8131 /include/linux/crypto.h | |
| parent | 08b83025dbff0cf59c6de550262999b3959067b2 (diff) | |
3.10.66 -> 3.10.67
Diffstat (limited to 'include/linux/crypto.h')
| -rw-r--r-- | include/linux/crypto.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index b92eadf92..2b00d92a6 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -26,6 +26,19 @@ #include <linux/uaccess.h> /* + * Autoloaded crypto modules should only use a prefixed name to avoid allowing + * arbitrary modules to be loaded. Loading from userspace may still need the + * unprefixed names, so retains those aliases as well. + * This uses __MODULE_INFO directly instead of MODULE_ALIAS because pre-4.3 + * gcc (e.g. avr32 toolchain) uses __LINE__ for uniqueness, and this macro + * expands twice on the same line. Instead, use a separate base name for the + * alias. + */ +#define MODULE_ALIAS_CRYPTO(name) \ + __MODULE_INFO(alias, alias_userspace, name); \ + __MODULE_INFO(alias, alias_crypto, "crypto-" name) + +/* * Algorithm masks and types. */ #define CRYPTO_ALG_TYPE_MASK 0x0000000f |
