diff options
author | Stephan Mueller <smueller@chronox.de> | 2015-03-30 16:11:46 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-31 09:21:13 -0400 |
commit | 555fa17b2b8cc865c203de263443041eb75bc7f7 (patch) | |
tree | afb7c3ae6c9832efe436a15cb5d6f449b634ee28 /arch/x86/crypto | |
parent | f52bbf55d1957b9ab279998dd71ed1c89b36e3a7 (diff) |
crypto: sha-mb - mark Multi buffer SHA1 helper cipher
Flag all Multi buffer SHA1 helper ciphers as internal ciphers
to prevent them from being called by normal users.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto')
-rw-r--r-- | arch/x86/crypto/sha-mb/sha1_mb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c index 9414fd964ecd..e510b1c5d690 100644 --- a/arch/x86/crypto/sha-mb/sha1_mb.c +++ b/arch/x86/crypto/sha-mb/sha1_mb.c | |||
@@ -694,7 +694,8 @@ static struct shash_alg sha1_mb_shash_alg = { | |||
694 | * use ASYNC flag as some buffers in multi-buffer | 694 | * use ASYNC flag as some buffers in multi-buffer |
695 | * algo may not have completed before hashing thread sleep | 695 | * algo may not have completed before hashing thread sleep |
696 | */ | 696 | */ |
697 | .cra_flags = CRYPTO_ALG_TYPE_SHASH | CRYPTO_ALG_ASYNC, | 697 | .cra_flags = CRYPTO_ALG_TYPE_SHASH | CRYPTO_ALG_ASYNC | |
698 | CRYPTO_ALG_INTERNAL, | ||
698 | .cra_blocksize = SHA1_BLOCK_SIZE, | 699 | .cra_blocksize = SHA1_BLOCK_SIZE, |
699 | .cra_module = THIS_MODULE, | 700 | .cra_module = THIS_MODULE, |
700 | .cra_list = LIST_HEAD_INIT(sha1_mb_shash_alg.base.cra_list), | 701 | .cra_list = LIST_HEAD_INIT(sha1_mb_shash_alg.base.cra_list), |
@@ -770,7 +771,9 @@ static int sha1_mb_async_init_tfm(struct crypto_tfm *tfm) | |||
770 | struct sha1_mb_ctx *ctx = crypto_tfm_ctx(tfm); | 771 | struct sha1_mb_ctx *ctx = crypto_tfm_ctx(tfm); |
771 | struct mcryptd_hash_ctx *mctx; | 772 | struct mcryptd_hash_ctx *mctx; |
772 | 773 | ||
773 | mcryptd_tfm = mcryptd_alloc_ahash("__intel_sha1-mb", 0, 0); | 774 | mcryptd_tfm = mcryptd_alloc_ahash("__intel_sha1-mb", |
775 | CRYPTO_ALG_INTERNAL, | ||
776 | CRYPTO_ALG_INTERNAL); | ||
774 | if (IS_ERR(mcryptd_tfm)) | 777 | if (IS_ERR(mcryptd_tfm)) |
775 | return PTR_ERR(mcryptd_tfm); | 778 | return PTR_ERR(mcryptd_tfm); |
776 | mctx = crypto_ahash_ctx(&mcryptd_tfm->base); | 779 | mctx = crypto_ahash_ctx(&mcryptd_tfm->base); |