crypto: aes-ce - mark ARMv8 AES helper ciphers
authorStephan Mueller <smueller@chronox.de>
Mon, 30 Mar 2015 20:09:53 +0000 (22:09 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 31 Mar 2015 13:21:12 +0000 (21:21 +0800)
Flag all ARMv8 AES 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/arm/crypto/aes-ce-glue.c

index d2ee59157ec7041e20ea334f6b428e0d3b748698..b445a5d56f4342b71540e40c1ce298e0ad786688 100644 (file)
@@ -354,7 +354,8 @@ static struct crypto_alg aes_algs[] = { {
        .cra_name               = "__ecb-aes-ce",
        .cra_driver_name        = "__driver-ecb-aes-ce",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = AES_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct crypto_aes_ctx),
        .cra_alignmask          = 7,
@@ -372,7 +373,8 @@ static struct crypto_alg aes_algs[] = { {
        .cra_name               = "__cbc-aes-ce",
        .cra_driver_name        = "__driver-cbc-aes-ce",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = AES_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct crypto_aes_ctx),
        .cra_alignmask          = 7,
@@ -390,7 +392,8 @@ static struct crypto_alg aes_algs[] = { {
        .cra_name               = "__ctr-aes-ce",
        .cra_driver_name        = "__driver-ctr-aes-ce",
        .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 crypto_aes_ctx),
        .cra_alignmask          = 7,
@@ -408,7 +411,8 @@ static struct crypto_alg aes_algs[] = { {
        .cra_name               = "__xts-aes-ce",
        .cra_driver_name        = "__driver-xts-aes-ce",
        .cra_priority           = 0,
-       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER,
+       .cra_flags              = CRYPTO_ALG_TYPE_BLKCIPHER |
+                                 CRYPTO_ALG_INTERNAL,
        .cra_blocksize          = AES_BLOCK_SIZE,
        .cra_ctxsize            = sizeof(struct crypto_aes_xts_ctx),
        .cra_alignmask          = 7,