linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL
@ 2011-12-13 10:52 Jussi Kivilinna
  2011-12-13 10:52 ` [PATCH 2/7] crypto - xts: " Jussi Kivilinna
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:52 UTC (permalink / raw)
  To: linux-crypto; +Cc: Rik Snel, Herbert Xu, David S. Miller

LRW has been EXPERIMENTAL since it was introduced in 2006. I'd say by now
it has seen enough testing to justify removal of EXPERIMENTAL tag.

CC: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 crypto/Kconfig |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index b8d1b10..3cc7511 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -241,8 +241,7 @@ config CRYPTO_ECB
 	  the input block by block.
 
 config CRYPTO_LRW
-	tristate "LRW support (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	tristate "LRW support"
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_MANAGER
 	select CRYPTO_GF128MUL

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/7] crypto - xts: remove dependency on EXPERIMENTAL
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
@ 2011-12-13 10:52 ` Jussi Kivilinna
  2011-12-13 10:53 ` [PATCH 3/7] crypto - twofish-x86_64-3way: select LRW and XTS Jussi Kivilinna
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:52 UTC (permalink / raw)
  To: linux-crypto; +Cc: Rik Snel, Herbert Xu, David S. Miller

XTS has been EXPERIMENTAL since it was introduced in 2007. I'd say by now
it has seen enough testing to justify removal of EXPERIMENTAL tag.

CC: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 crypto/Kconfig |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 3cc7511..a77cd8e 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -261,8 +261,7 @@ config CRYPTO_PCBC
 	  This block cipher algorithm is required for RxRPC.
 
 config CRYPTO_XTS
-	tristate "XTS support (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	tristate "XTS support"
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_MANAGER
 	select CRYPTO_GF128MUL

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/7] crypto - twofish-x86_64-3way: select LRW and XTS
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
  2011-12-13 10:52 ` [PATCH 2/7] crypto - xts: " Jussi Kivilinna
@ 2011-12-13 10:53 ` Jussi Kivilinna
  2011-12-13 10:53 ` [PATCH 4/7] crypto - twofish-x86_64-3way: remove unneeded LRW/XTS #ifdefs Jussi Kivilinna
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:53 UTC (permalink / raw)
  To: linux-crypto; +Cc: Herbert Xu, David S. Miller

twofish-x86_64-3way uses functions from LRW and XTS modules, so selecting would
appear to be better option than using #ifdefs in twofish_glue_3way.c to
enable/disable LRW and XTS features.

This also fixes build problem when twofish-x86_64-3way would be build into
kernel but XTS/LRW are build as modules.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 crypto/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index a77cd8e..3cd303b 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -876,6 +876,8 @@ config CRYPTO_TWOFISH_X86_64_3WAY
 	select CRYPTO_ALGAPI
 	select CRYPTO_TWOFISH_COMMON
 	select CRYPTO_TWOFISH_X86_64
+	select CRYPTO_LRW
+	select CRYPTO_XTS
 	help
 	  Twofish cipher algorithm (x86_64, 3-way parallel).
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/7] crypto - twofish-x86_64-3way: remove unneeded LRW/XTS #ifdefs
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
  2011-12-13 10:52 ` [PATCH 2/7] crypto - xts: " Jussi Kivilinna
  2011-12-13 10:53 ` [PATCH 3/7] crypto - twofish-x86_64-3way: select LRW and XTS Jussi Kivilinna
@ 2011-12-13 10:53 ` Jussi Kivilinna
  2011-12-13 10:53 ` [PATCH 5/7] crypto - serpent-sse2: select LRW and XTS Jussi Kivilinna
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:53 UTC (permalink / raw)
  To: linux-crypto; +Cc: Herbert Xu, David S. Miller

Since LRW & XTS are selected by twofish-x86_64-3way, we don't need these
#ifdefs anymore.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 arch/x86/crypto/twofish_glue_3way.c |   32 --------------------------------
 1 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c
index 954f59e..7fee8c1 100644
--- a/arch/x86/crypto/twofish_glue_3way.c
+++ b/arch/x86/crypto/twofish_glue_3way.c
@@ -35,14 +35,6 @@
 #include <crypto/lrw.h>
 #include <crypto/xts.h>
 
-#if defined(CONFIG_CRYPTO_LRW) || defined(CONFIG_CRYPTO_LRW_MODULE)
-#define HAS_LRW
-#endif
-
-#if defined(CONFIG_CRYPTO_XTS) || defined(CONFIG_CRYPTO_XTS_MODULE)
-#define HAS_XTS
-#endif
-
 /* regular block cipher functions from twofish_x86_64 module */
 asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst,
 				const u8 *src);
@@ -442,8 +434,6 @@ static struct crypto_alg blk_ctr_alg = {
 	},
 };
 
-#if defined(HAS_LRW) || defined(HAS_XTS)
-
 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes)
 {
 	const unsigned int bsize = TF_BLOCK_SIZE;
@@ -474,10 +464,6 @@ static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes)
 		twofish_dec_blk(ctx, srcdst, srcdst);
 }
 
-#endif
-
-#ifdef HAS_LRW
-
 struct twofish_lrw_ctx {
 	struct lrw_table_ctx lrw_table;
 	struct twofish_ctx twofish_ctx;
@@ -562,10 +548,6 @@ static struct crypto_alg blk_lrw_alg = {
 	},
 };
 
-#endif
-
-#ifdef HAS_XTS
-
 struct twofish_xts_ctx {
 	struct twofish_ctx tweak_ctx;
 	struct twofish_ctx crypt_ctx;
@@ -655,8 +637,6 @@ static struct crypto_alg blk_xts_alg = {
 	},
 };
 
-#endif
-
 int __init init(void)
 {
 	int err;
@@ -670,27 +650,19 @@ int __init init(void)
 	err = crypto_register_alg(&blk_ctr_alg);
 	if (err)
 		goto ctr_err;
-#ifdef HAS_LRW
 	err = crypto_register_alg(&blk_lrw_alg);
 	if (err)
 		goto blk_lrw_err;
-#endif
-#ifdef HAS_XTS
 	err = crypto_register_alg(&blk_xts_alg);
 	if (err)
 		goto blk_xts_err;
-#endif
 
 	return 0;
 
-#ifdef HAS_XTS
 	crypto_unregister_alg(&blk_xts_alg);
 blk_xts_err:
-#endif
-#ifdef HAS_LRW
 	crypto_unregister_alg(&blk_lrw_alg);
 blk_lrw_err:
-#endif
 	crypto_unregister_alg(&blk_ctr_alg);
 ctr_err:
 	crypto_unregister_alg(&blk_cbc_alg);
@@ -702,12 +674,8 @@ ecb_err:
 
 void __exit fini(void)
 {
-#ifdef HAS_XTS
 	crypto_unregister_alg(&blk_xts_alg);
-#endif
-#ifdef HAS_LRW
 	crypto_unregister_alg(&blk_lrw_alg);
-#endif
 	crypto_unregister_alg(&blk_ctr_alg);
 	crypto_unregister_alg(&blk_cbc_alg);
 	crypto_unregister_alg(&blk_ecb_alg);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/7] crypto - serpent-sse2: select LRW and XTS
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
                   ` (2 preceding siblings ...)
  2011-12-13 10:53 ` [PATCH 4/7] crypto - twofish-x86_64-3way: remove unneeded LRW/XTS #ifdefs Jussi Kivilinna
@ 2011-12-13 10:53 ` Jussi Kivilinna
  2011-12-13 10:53 ` [PATCH 6/7] crypto - serpent-sse2: remove unneeded LRW/XTS #ifdefs Jussi Kivilinna
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:53 UTC (permalink / raw)
  To: linux-crypto; +Cc: Herbert Xu, David S. Miller

serpent-sse2 uses functions from LRW and XTS modules, so selecting would appear
to be better option than using #ifdefs in serpent_sse2_glue.c to enable/disable
LRW and XTS features.

This also fixes build problem when serpent-sse2 would be build into kernel but
XTS/LRW are build as modules.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 crypto/Kconfig |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 3cd303b..d7d4d4e 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -770,6 +770,8 @@ config CRYPTO_SERPENT_SSE2_X86_64
 	select CRYPTO_ALGAPI
 	select CRYPTO_CRYPTD
 	select CRYPTO_SERPENT
+	select CRYPTO_LRW
+	select CRYPTO_XTS
 	help
 	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
 
@@ -788,6 +790,8 @@ config CRYPTO_SERPENT_SSE2_586
 	select CRYPTO_ALGAPI
 	select CRYPTO_CRYPTD
 	select CRYPTO_SERPENT
+	select CRYPTO_LRW
+	select CRYPTO_XTS
 	help
 	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/7] crypto - serpent-sse2: remove unneeded LRW/XTS #ifdefs
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
                   ` (3 preceding siblings ...)
  2011-12-13 10:53 ` [PATCH 5/7] crypto - serpent-sse2: select LRW and XTS Jussi Kivilinna
@ 2011-12-13 10:53 ` Jussi Kivilinna
  2011-12-13 10:53 ` [PATCH 7/7] crypto - gf128mul: remove leftover "(EXPERIMENTAL)" in Kconfig Jussi Kivilinna
  2011-12-20  7:25 ` [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Herbert Xu
  6 siblings, 0 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:53 UTC (permalink / raw)
  To: linux-crypto; +Cc: Herbert Xu, David S. Miller

Since LRW & XTS are selected by serpent-sse2, we don't need these #ifdefs
anymore.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 arch/x86/crypto/serpent_sse2_glue.c |   40 -----------------------------------
 1 files changed, 0 insertions(+), 40 deletions(-)

diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c
index 2f5c304..7955a9b 100644
--- a/arch/x86/crypto/serpent_sse2_glue.c
+++ b/arch/x86/crypto/serpent_sse2_glue.c
@@ -47,14 +47,6 @@
 #include <linux/workqueue.h>
 #include <linux/spinlock.h>
 
-#if defined(CONFIG_CRYPTO_LRW) || defined(CONFIG_CRYPTO_LRW_MODULE)
-#define HAS_LRW
-#endif
-
-#if defined(CONFIG_CRYPTO_XTS) || defined(CONFIG_CRYPTO_XTS_MODULE)
-#define HAS_XTS
-#endif
-
 struct async_serpent_ctx {
 	struct cryptd_ablkcipher *cryptd_tfm;
 };
@@ -470,8 +462,6 @@ static struct crypto_alg blk_ctr_alg = {
 	},
 };
 
-#if defined(HAS_LRW) || defined(HAS_XTS)
-
 struct crypt_priv {
 	struct serpent_ctx *ctx;
 	bool fpu_enabled;
@@ -511,10 +501,6 @@ static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes)
 		__serpent_decrypt(ctx->ctx, srcdst, srcdst);
 }
 
-#endif
-
-#ifdef HAS_LRW
-
 struct serpent_lrw_ctx {
 	struct lrw_table_ctx lrw_table;
 	struct serpent_ctx serpent_ctx;
@@ -620,10 +606,6 @@ static struct crypto_alg blk_lrw_alg = {
 	},
 };
 
-#endif
-
-#ifdef HAS_XTS
-
 struct serpent_xts_ctx {
 	struct serpent_ctx tweak_ctx;
 	struct serpent_ctx crypt_ctx;
@@ -730,8 +712,6 @@ static struct crypto_alg blk_xts_alg = {
 	},
 };
 
-#endif
-
 static int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key,
 			unsigned int key_len)
 {
@@ -930,8 +910,6 @@ static struct crypto_alg ablk_ctr_alg = {
 	},
 };
 
-#ifdef HAS_LRW
-
 static int ablk_lrw_init(struct crypto_tfm *tfm)
 {
 	struct cryptd_ablkcipher *cryptd_tfm;
@@ -970,10 +948,6 @@ static struct crypto_alg ablk_lrw_alg = {
 	},
 };
 
-#endif
-
-#ifdef HAS_XTS
-
 static int ablk_xts_init(struct crypto_tfm *tfm)
 {
 	struct cryptd_ablkcipher *cryptd_tfm;
@@ -1010,8 +984,6 @@ static struct crypto_alg ablk_xts_alg = {
 	},
 };
 
-#endif
-
 static int __init serpent_sse2_init(void)
 {
 	int err;
@@ -1039,36 +1011,28 @@ static int __init serpent_sse2_init(void)
 	err = crypto_register_alg(&ablk_ctr_alg);
 	if (err)
 		goto ablk_ctr_err;
-#ifdef HAS_LRW
 	err = crypto_register_alg(&blk_lrw_alg);
 	if (err)
 		goto blk_lrw_err;
 	err = crypto_register_alg(&ablk_lrw_alg);
 	if (err)
 		goto ablk_lrw_err;
-#endif
-#ifdef HAS_XTS
 	err = crypto_register_alg(&blk_xts_alg);
 	if (err)
 		goto blk_xts_err;
 	err = crypto_register_alg(&ablk_xts_alg);
 	if (err)
 		goto ablk_xts_err;
-#endif
 	return err;
 
-#ifdef HAS_XTS
 	crypto_unregister_alg(&ablk_xts_alg);
 ablk_xts_err:
 	crypto_unregister_alg(&blk_xts_alg);
 blk_xts_err:
-#endif
-#ifdef HAS_LRW
 	crypto_unregister_alg(&ablk_lrw_alg);
 ablk_lrw_err:
 	crypto_unregister_alg(&blk_lrw_alg);
 blk_lrw_err:
-#endif
 	crypto_unregister_alg(&ablk_ctr_alg);
 ablk_ctr_err:
 	crypto_unregister_alg(&ablk_cbc_alg);
@@ -1086,14 +1050,10 @@ blk_ecb_err:
 
 static void __exit serpent_sse2_exit(void)
 {
-#ifdef HAS_XTS
 	crypto_unregister_alg(&ablk_xts_alg);
 	crypto_unregister_alg(&blk_xts_alg);
-#endif
-#ifdef HAS_LRW
 	crypto_unregister_alg(&ablk_lrw_alg);
 	crypto_unregister_alg(&blk_lrw_alg);
-#endif
 	crypto_unregister_alg(&ablk_ctr_alg);
 	crypto_unregister_alg(&ablk_cbc_alg);
 	crypto_unregister_alg(&ablk_ecb_alg);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/7] crypto - gf128mul: remove leftover "(EXPERIMENTAL)" in Kconfig
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
                   ` (4 preceding siblings ...)
  2011-12-13 10:53 ` [PATCH 6/7] crypto - serpent-sse2: remove unneeded LRW/XTS #ifdefs Jussi Kivilinna
@ 2011-12-13 10:53 ` Jussi Kivilinna
  2011-12-20  7:25 ` [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Herbert Xu
  6 siblings, 0 replies; 8+ messages in thread
From: Jussi Kivilinna @ 2011-12-13 10:53 UTC (permalink / raw)
  To: linux-crypto; +Cc: Herbert Xu, David S. Miller

CRYPTO_GF128MUL does not select EXPERIMENTAL anymore so remove the
"(EXPERIMENTAL)" from its name.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 crypto/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index d7d4d4e..7ae0d0f 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -117,7 +117,7 @@ config CRYPTO_MANAGER_DISABLE_TESTS
 	  algorithm registration.
 
 config CRYPTO_GF128MUL
-	tristate "GF(2^128) multiplication functions (EXPERIMENTAL)"
+	tristate "GF(2^128) multiplication functions"
 	help
 	  Efficient table driven implementation of multiplications in the
 	  field GF(2^128).  This is needed by some cypher modes. This

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL
  2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
                   ` (5 preceding siblings ...)
  2011-12-13 10:53 ` [PATCH 7/7] crypto - gf128mul: remove leftover "(EXPERIMENTAL)" in Kconfig Jussi Kivilinna
@ 2011-12-20  7:25 ` Herbert Xu
  6 siblings, 0 replies; 8+ messages in thread
From: Herbert Xu @ 2011-12-20  7:25 UTC (permalink / raw)
  To: Jussi Kivilinna; +Cc: linux-crypto, Rik Snel, David S. Miller

On Tue, Dec 13, 2011 at 12:52:51PM +0200, Jussi Kivilinna wrote:
> LRW has been EXPERIMENTAL since it was introduced in 2006. I'd say by now
> it has seen enough testing to justify removal of EXPERIMENTAL tag.
> 
> CC: Rik Snel <rsnel@cube.dyndns.org>
> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-12-20  7:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13 10:52 [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Jussi Kivilinna
2011-12-13 10:52 ` [PATCH 2/7] crypto - xts: " Jussi Kivilinna
2011-12-13 10:53 ` [PATCH 3/7] crypto - twofish-x86_64-3way: select LRW and XTS Jussi Kivilinna
2011-12-13 10:53 ` [PATCH 4/7] crypto - twofish-x86_64-3way: remove unneeded LRW/XTS #ifdefs Jussi Kivilinna
2011-12-13 10:53 ` [PATCH 5/7] crypto - serpent-sse2: select LRW and XTS Jussi Kivilinna
2011-12-13 10:53 ` [PATCH 6/7] crypto - serpent-sse2: remove unneeded LRW/XTS #ifdefs Jussi Kivilinna
2011-12-13 10:53 ` [PATCH 7/7] crypto - gf128mul: remove leftover "(EXPERIMENTAL)" in Kconfig Jussi Kivilinna
2011-12-20  7:25 ` [PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL Herbert Xu

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).