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

index 15468fbbdea393ed020510abbb30145b52bce396..6d685298690ed228b416c7cf67c58e8b6d6f2909 100644 (file)
@@ -301,7 +301,8 @@ static struct crypto_alg aesbs_algs[] = { {
        .cra_name               = "__cbc-aes-neonbs",
        .cra_driver_name        = "__driver-cbc-aes-neonbs",
        .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 aesbs_cbc_ctx),
        .cra_alignmask          = 7,
@@ -319,7 +320,8 @@ static struct crypto_alg aesbs_algs[] = { {
        .cra_name               = "__ctr-aes-neonbs",
        .cra_driver_name        = "__driver-ctr-aes-neonbs",
        .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 aesbs_ctr_ctx),
        .cra_alignmask          = 7,
@@ -337,7 +339,8 @@ static struct crypto_alg aesbs_algs[] = { {
        .cra_name               = "__xts-aes-neonbs",
        .cra_driver_name        = "__driver-xts-aes-neonbs",
        .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 aesbs_xts_ctx),
        .cra_alignmask          = 7,