crypto: serpent_sse2 - mark Serpent SSE2 helper ciphers
authorStephan Mueller <smueller@chronox.de>
Mon, 30 Mar 2015 20:07:45 +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 SSE2 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_sse2_glue.c

index bf025adaea01bba090a09867490bd960a7674290..3643dd508f45aa7a1a37fdf7f100358977d07830 100644 (file)
@@ -387,7 +387,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__ecb-serpent-sse2",
        .cra_driver_name        = "__driver-ecb-serpent-sse2",
        .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,
@@ -406,7 +407,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__cbc-serpent-sse2",
        .cra_driver_name        = "__driver-cbc-serpent-sse2",
        .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,
@@ -425,7 +427,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__ctr-serpent-sse2",
        .cra_driver_name        = "__driver-ctr-serpent-sse2",
        .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,
@@ -445,7 +448,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__lrw-serpent-sse2",
        .cra_driver_name        = "__driver-lrw-serpent-sse2",
        .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,
@@ -468,7 +472,8 @@ static struct crypto_alg serpent_algs[10] = { {
        .cra_name               = "__xts-serpent-sse2",
        .cra_driver_name        = "__driver-xts-serpent-sse2",
        .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,