mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: "'Herbert Xu" <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 16/20] crypto: mark NEON bit sliced AES helper ciphers
Date: Fri, 27 Mar 2015 23:59:18 +0100	[thread overview]
Message-ID: <2775612.Q05lyYA2td@tachyon.chronox.de> (raw)
In-Reply-To: <1746748.uPZFXamDiM@tachyon.chronox.de>

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>
---
 arch/arm/crypto/aesbs-glue.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/crypto/aesbs-glue.c
index 15468fb..6d68529 100644
--- a/arch/arm/crypto/aesbs-glue.c
+++ b/arch/arm/crypto/aesbs-glue.c
@@ -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,
-- 
2.1.0



  parent reply	other threads:[~2015-03-27 23:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 22:49 [PATCH v2 00/20] crypto: restrict usage of " Stephan Mueller
2015-03-27 22:49 ` [PATCH v2 01/20] crypto: prevent helper ciphers from being used Stephan Mueller
2015-03-27 22:50 ` [PATCH v2 02/20] crypto: testmgr to use CRYPTO_ALG_INTERNAL Stephan Mueller
2015-03-30 13:10   ` Herbert Xu
2015-03-30 19:31     ` Stephan Mueller
2015-03-27 22:51 ` [PATCH v2 03/20] crypto: cryptd to process CRYPTO_ALG_INTERNAL Stephan Mueller
2015-03-27 22:52 ` [PATCH v2 04/20] crypto: /proc/crypto: identify internal ciphers Stephan Mueller
2015-03-27 22:52 ` [PATCH v2 05/20] crypto: mark AES-NI helper ciphers Stephan Mueller
2015-03-27 22:53 ` [PATCH v2 06/20] crypto: mark ghash clmulni " Stephan Mueller
2015-03-27 22:54 ` [PATCH v2 07/20] crypto: mark GHASH ARMv8 vmull.p64 " Stephan Mueller
2015-03-27 22:54 ` [PATCH v2 08/20] crypto: mark AES-NI Camellia " Stephan Mueller
2015-03-27 22:55 ` [PATCH v2 09/20] crypto: mark CAST5 " Stephan Mueller
2015-03-27 22:55 ` [PATCH v2 10/20] crypto: mark AVX Camellia " Stephan Mueller
2015-03-27 22:56 ` [PATCH v2 11/20] crypto: mark CAST6 " Stephan Mueller
2015-03-27 22:56 ` [PATCH v2 12/20] crypto: mark Serpent AVX2 " Stephan Mueller
2015-03-27 22:57 ` [PATCH v2 13/20] crypto: mark Serpent AVX " Stephan Mueller
2015-03-27 22:57 ` [PATCH v2 14/20] crypto: mark Serpent SSE2 " Stephan Mueller
2015-03-27 22:58 ` [PATCH v2 15/20] crypto: mark Twofish AVX " Stephan Mueller
2015-03-27 22:59 ` Stephan Mueller [this message]
2015-03-27 23:00 ` [PATCH v2 17/20] crypto: mark ARMv8 AES " Stephan Mueller
2015-03-27 23:00 ` [PATCH v2 18/20] crypto: mark 64 bit " Stephan Mueller
2015-03-27 23:01 ` [PATCH v2 19/20] crypto: mcryptd to process CRYPTO_ALG_INTERNAL Stephan Mueller
2015-03-27 23:02 ` [PATCH v2 20/20] crypto: mark Multi buffer SHA1 helper cipher Stephan Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2775612.Q05lyYA2td@tachyon.chronox.de \
    --to=smueller@chronox.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome