diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 12:52:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 12:52:51 -0400 |
commit | 3e7a716a92a0e051f5502c7b689f8c9127c37c33 (patch) | |
tree | 2ebb892eb3a024f108e68a9577c767a53b955a4a /crypto/algapi.c | |
parent | c2df436bd2504f52808c10ab7d7da832f61ad3f0 (diff) | |
parent | ce5481d01f67ad304908ec2113515440c0fa86eb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
- CTR(AES) optimisation on x86_64 using "by8" AVX.
- arm64 support to ccp
- Intel QAT crypto driver
- Qualcomm crypto engine driver
- x86-64 assembly optimisation for 3DES
- CTR(3DES) speed test
- move FIPS panic from module.c so that it only triggers on crypto
modules
- SP800-90A Deterministic Random Bit Generator (drbg).
- more test vectors for ghash.
- tweak self tests to catch partial block bugs.
- misc fixes.
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (94 commits)
crypto: drbg - fix failure of generating multiple of 2**16 bytes
crypto: ccp - Do not sign extend input data to CCP
crypto: testmgr - add missing spaces to drbg error strings
crypto: atmel-tdes - Switch to managed version of kzalloc
crypto: atmel-sha - Switch to managed version of kzalloc
crypto: testmgr - use chunks smaller than algo block size in chunk tests
crypto: qat - Fixed SKU1 dev issue
crypto: qat - Use hweight for bit counting
crypto: qat - Updated print outputs
crypto: qat - change ae_num to ae_id
crypto: qat - change slice->regions to slice->region
crypto: qat - use min_t macro
crypto: qat - remove unnecessary parentheses
crypto: qat - remove unneeded header
crypto: qat - checkpatch blank lines
crypto: qat - remove unnecessary return codes
crypto: Resolve shadow warnings
crypto: ccp - Remove "select OF" from Kconfig
crypto: caam - fix DECO RSR polling
crypto: qce - Let 'DEV_QCE' depend on both HAS_DMA and HAS_IOMEM
...
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 7a1ae87f1683..e8d3a7dca8c4 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -41,8 +41,20 @@ static inline int crypto_set_driver_name(struct crypto_alg *alg) | |||
41 | return 0; | 41 | return 0; |
42 | } | 42 | } |
43 | 43 | ||
44 | static inline void crypto_check_module_sig(struct module *mod) | ||
45 | { | ||
46 | #ifdef CONFIG_CRYPTO_FIPS | ||
47 | if (fips_enabled && mod && !mod->sig_ok) | ||
48 | panic("Module %s signature verification failed in FIPS mode\n", | ||
49 | mod->name); | ||
50 | #endif | ||
51 | return; | ||
52 | } | ||
53 | |||
44 | static int crypto_check_alg(struct crypto_alg *alg) | 54 | static int crypto_check_alg(struct crypto_alg *alg) |
45 | { | 55 | { |
56 | crypto_check_module_sig(alg->cra_module); | ||
57 | |||
46 | if (alg->cra_alignmask & (alg->cra_alignmask + 1)) | 58 | if (alg->cra_alignmask & (alg->cra_alignmask + 1)) |
47 | return -EINVAL; | 59 | return -EINVAL; |
48 | 60 | ||
@@ -430,6 +442,8 @@ int crypto_register_template(struct crypto_template *tmpl) | |||
430 | 442 | ||
431 | down_write(&crypto_alg_sem); | 443 | down_write(&crypto_alg_sem); |
432 | 444 | ||
445 | crypto_check_module_sig(tmpl->module); | ||
446 | |||
433 | list_for_each_entry(q, &crypto_template_list, list) { | 447 | list_for_each_entry(q, &crypto_template_list, list) { |
434 | if (q == tmpl) | 448 | if (q == tmpl) |
435 | goto out; | 449 | goto out; |