LKML Archive on lore.kernel.org
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 v3 14/20] crypto: mark Serpent SSE2 helper ciphers
Date: Mon, 30 Mar 2015 22:07:45 +0200	[thread overview]
Message-ID: <13471471.Qs62XK2H7b@tachyon.chronox.de> (raw)
In-Reply-To: <3417827.fluZli1WvQ@tachyon.chronox.de>

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>
---
 arch/x86/crypto/serpent_sse2_glue.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c
index bf025ad..3643dd5 100644
--- a/arch/x86/crypto/serpent_sse2_glue.c
+++ b/arch/x86/crypto/serpent_sse2_glue.c
@@ -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,
-- 
2.1.0



  parent reply	other threads:[~2015-03-30 20:07 UTC|newest]

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

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=13471471.Qs62XK2H7b@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 \
    --subject='Re: [PATCH v3 14/20] crypto: mark Serpent SSE2 helper ciphers' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).