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

index 437e47a4d302f584dfbeb3fef6ab76fc6e39008a..2f63dc89e7a9ed0fa55b1ede20e7bd0ba2c060ca 100644 (file)
@@ -309,7 +309,8 @@ static struct crypto_alg srp_algs[10] = { {
        .cra_name               = "__ecb-serpent-avx2",
        .cra_driver_name        = "__driver-ecb-serpent-avx2",
        .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,
@@ -329,7 +330,8 @@ static struct crypto_alg srp_algs[10] = { {
        .cra_name               = "__cbc-serpent-avx2",
        .cra_driver_name        = "__driver-cbc-serpent-avx2",
        .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,
@@ -349,7 +351,8 @@ static struct crypto_alg srp_algs[10] = { {
        .cra_name               = "__ctr-serpent-avx2",
        .cra_driver_name        = "__driver-ctr-serpent-avx2",
        .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,
@@ -370,7 +373,8 @@ static struct crypto_alg srp_algs[10] = { {
        .cra_name               = "__lrw-serpent-avx2",
        .cra_driver_name        = "__driver-lrw-serpent-avx2",
        .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,
@@ -394,7 +398,8 @@ static struct crypto_alg srp_algs[10] = { {
        .cra_name               = "__xts-serpent-avx2",
        .cra_driver_name        = "__driver-xts-serpent-avx2",
        .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,