crypto: camellia_aesni_avx - mark AVX Camellia helper ciphers
authorStephan Mueller <smueller@chronox.de>
Mon, 30 Mar 2015 20:04:49 +0000 (22:04 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 31 Mar 2015 13:21:08 +0000 (21:21 +0800)
Flag all AVX Camellia 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/camellia_aesni_avx_glue.c

index ed38d959add6a8aa09f3e32285de6372eea3a7e8..78818a1e73e3f62b0e7be68123fcef148e978f77 100644 (file)
@@ -335,7 +335,8 @@ static struct crypto_alg cmll_algs[10] = { {
        .cra_name               = "__ecb-camellia-aesni",
        .cra_driver_name        = "__driver-ecb-camellia-aesni",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = CAMELLIA_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct camellia_ctx),
        .cra_alignmask          = 0,
@@ -354,7 +355,8 @@ static struct crypto_alg cmll_algs[10] = { {
        .cra_name               = "__cbc-camellia-aesni",
        .cra_driver_name        = "__driver-cbc-camellia-aesni",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = CAMELLIA_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct camellia_ctx),
        .cra_alignmask          = 0,
@@ -373,7 +375,8 @@ static struct crypto_alg cmll_algs[10] = { {
        .cra_name               = "__ctr-camellia-aesni",
        .cra_driver_name        = "__driver-ctr-camellia-aesni",
        .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 camellia_ctx),
        .cra_alignmask          = 0,
@@ -393,7 +396,8 @@ static struct crypto_alg cmll_algs[10] = { {
        .cra_name               = "__lrw-camellia-aesni",
        .cra_driver_name        = "__driver-lrw-camellia-aesni",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = CAMELLIA_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct camellia_lrw_ctx),
        .cra_alignmask          = 0,
@@ -416,7 +420,8 @@ static struct crypto_alg cmll_algs[10] = { {
        .cra_name               = "__xts-camellia-aesni",
        .cra_driver_name        = "__driver-xts-camellia-aesni",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = CAMELLIA_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct camellia_xts_ctx),
        .cra_alignmask          = 0,