]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
crypto: serpent_avx - mark Serpent AVX helper ciphers
authorStephan Mueller <smueller@chronox.de>
Mon, 30 Mar 2015 20:07:05 +0000 (22:07 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 31 Mar 2015 13:21:10 +0000 (21:21 +0800)
Flag all Serpent AVX 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>
arch/x86/crypto/serpent_avx_glue.c

index 7e217398b4eb1d4656f59b1a90f707bd6028fe94..c8d478af84563e72a4ca21b9b5fd725b4c8aa248 100644 (file)
@@ -378,7 +378,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__ecb-serpent-avx",
        .cra_driver_name        = "__driver-ecb-serpent-avx",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = SERPENT_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct serpent_ctx),
        .cra_alignmask          = 0,
@@ -397,7 +398,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__cbc-serpent-avx",
        .cra_driver_name        = "__driver-cbc-serpent-avx",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = SERPENT_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct serpent_ctx),
        .cra_alignmask          = 0,
@@ -416,7 +418,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__ctr-serpent-avx",
        .cra_driver_name        = "__driver-ctr-serpent-avx",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = 1,
        .cra_ctxsize            = sizeof(struct serpent_ctx),
        .cra_alignmask          = 0,
@@ -436,7 +439,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__lrw-serpent-avx",
        .cra_driver_name        = "__driver-lrw-serpent-avx",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = SERPENT_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct serpent_lrw_ctx),
        .cra_alignmask          = 0,
@@ -459,7 +463,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__xts-serpent-avx",
        .cra_driver_name        = "__driver-xts-serpent-avx",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = SERPENT_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct serpent_xts_ctx),
        .cra_alignmask          = 0,