Re: Crypto: Add support for 192 & 256 bit keys to AESNI RFC4106 - resubmission

2015-01-11 Thread Herbert Xu
On Sun, Jan 11, 2015 at 11:48:08PM -0500, Timothy McCaffrey wrote:
>
> This patch has been tested with Sandy Bridge and Haswell processors.  With 128
> bit keys and input buffers > 512 bytes a slight performance degradation was
> noticed (~1%).  For input buffers of less than 512 bytes there was no
> performance impact.  Compared to 128 bit keys, 256 bit key size performance
> is approx. .5 cycles per byte slower on Sandy Bridge, and .37 cycles per 
> byte slower on Haswell (vs. SSE code).

Thanks Tim!

While I think your patch should definitely be applied to the
current GCM implementation, longer term I'd like to see some
justification why we're adding these optimisations in the form
of gcm-aesni rather than ghash-avx and ctr-aesni.

Is there any reason why these optimisations can't be added to
the standalone ghash or ctr(aes)? Or for that matter is there
some fundamental synergy that I'm not seeing that you would only
get by putting these into gcm-aesni?

If the answers are no and no, then I'd like to see all these
optimisations migrated over to ghash and ctr(aes) and then we
can simply remove gcm-aesni.

Cheers,
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Crypto: Add support for 192 & 256 bit keys to AESNI RFC4106 - resubmission

2015-01-11 Thread Timothy McCaffrey
These patches fix the RFC4106 implementation in the aesni-intel module so it
supports 192 & 256 bit keys.

Since the AVX support that was added to this module also only supports 128 bit 
keys,
and this patch only affects the SSE implementation, changes were also made to
use the SSE version if key sizes other than 128 are specified.

RFC4106 specifies that 192 & 256 bit keys must be supported (section 8.4).

Also, this should fix Strongswan issue 341 where the aesni module needs to be
unloaded if 256 bit keys are used:

http://wiki.strongswan.org/issues/341

This patch has been tested with Sandy Bridge and Haswell processors.  With 128
bit keys and input buffers > 512 bytes a slight performance degradation was
noticed (~1%).  For input buffers of less than 512 bytes there was no
performance impact.  Compared to 128 bit keys, 256 bit key size performance
is approx. .5 cycles per byte slower on Sandy Bridge, and .37 cycles per 
byte slower on Haswell (vs. SSE code).

This patch has also been tested with StrongSwan IPSec connections where it
worked correctly.

I created this diff from a git clone of crypto-2.6.git.

Any questions, please feel free to contact me.

Signed off by: timothy.mccaff...@unisys.com
(submitted via timcaffrey...@gmail.com due to email reformatting issues).

diff --git a/arch/x86/crypto/aesni-intel_asm.S 
b/arch/x86/crypto/aesni-intel_asm.S
index 477e9d7..5855172 100644
--- a/arch/x86/crypto/aesni-intel_asm.S
+++ b/arch/x86/crypto/aesni-intel_asm.S
@@ -32,12 +32,23 @@
  #include 
  #include 

+/*
+* The following macros are used to move an (un)aligned 16 byte value to/from
+* an XMM register.  This can done for either FP or integer values, for FP use
+* movaps (move aligned packed single) or integer use movdqa (move double quad 
+* aligned).  It doesn't make a performance difference which instruction is used
+* since Nehalem (original Core i7) was released.  However, the movaps is a byte
+* shorter, so that is the one we'll use for now. (same for unaligned).
+*/
+#define MOVADQ movaps
+#define MOVUDQ movups
+
  #ifdef __x86_64__
+
  .data
  .align 16
  .Lgf128mul_x_ble_mask:
.octa 0x00010087
-
  POLY:   .octa 0xC201
  TWOONE: .octa 0x00010001

@@ -89,6 +100,7 @@ enc:.octa 0x2
  #define arg8 STACK_OFFSET+16(%r14)
  #define arg9 STACK_OFFSET+24(%r14)
  #define arg10 STACK_OFFSET+32(%r14)
+#define keysize 2*15*16(%arg1)
  #endif


@@ -213,10 +225,12 @@ enc:.octa 0x2

  .macro INITIAL_BLOCKS_DEC num_initial_blocks TMP1 TMP2 TMP3 TMP4 TMP5 XMM0 
XMM1 \
  XMM2 XMM3 XMM4 XMMDst TMP6 TMP7 i i_seq operation
+MOVADQ SHUF_MASK(%rip), %xmm14
movarg7, %r10   # %r10 = AAD
movarg8, %r12   # %r12 = aadLen
mov%r12, %r11
pxor   %xmm\i, %xmm\i
+
  _get_AAD_loop\num_initial_blocks\operation:
movd   (%r10), \TMP1
pslldq $12, \TMP1
@@ -225,16 +239,18 @@ _get_AAD_loop\num_initial_blocks\operation:
add$4, %r10
sub$4, %r12
jne_get_AAD_loop\num_initial_blocks\operation
+
cmp$16, %r11
je _get_AAD_loop2_done\num_initial_blocks\operation
+
mov$16, %r12
  _get_AAD_loop2\num_initial_blocks\operation:
psrldq $4, %xmm\i
sub$4, %r12
cmp%r11, %r12
jne_get_AAD_loop2\num_initial_blocks\operation
+
  _get_AAD_loop2_done\num_initial_blocks\operation:
-movdqa SHUF_MASK(%rip), %xmm14
PSHUFB_XMM   %xmm14, %xmm\i # byte-reflect the AAD data

xor%r11, %r11 # initialise the data pointer offset as zero
@@ -243,59 +259,34 @@ _get_AAD_loop2_done\num_initial_blocks\operation:

mov%arg5, %rax  # %rax = *Y0
movdqu (%rax), \XMM0# XMM0 = Y0
-movdqa SHUF_MASK(%rip), %xmm14
PSHUFB_XMM   %xmm14, \XMM0

  .if (\i == 5) || (\i == 6) || (\i == 7)
+   MOVADQ  ONE(%RIP),\TMP1
+   MOVADQ  (%arg1),\TMP2
  .irpc index, \i_seq
-   paddd  ONE(%rip), \XMM0 # INCR Y0
+   paddd  \TMP1, \XMM0 # INCR Y0
movdqa \XMM0, %xmm\index
-movdqa SHUF_MASK(%rip), %xmm14
PSHUFB_XMM   %xmm14, %xmm\index  # perform a 16 byte swap
-
-.endr
-.irpc index, \i_seq
-   pxor   16*0(%arg1), %xmm\index
-.endr
-.irpc index, \i_seq
-   movaps 0x10(%rdi), \TMP1
-   AESENC \TMP1, %xmm\index  # Round 1
-.endr
-.irpc index, \i_seq
-   movaps 0x20(%arg1), \TMP1
-   AESENC \TMP1, %xmm\index  # Round 2
+   pxor   \TMP2, %xmm\index
  .endr
-.irpc index, \i_seq
-   movaps 0x30(%arg1), \TMP1
-   AESENC \TMP1, %xmm\index  # Round 2
-.endr
-.irpc index, \i_seq
-   movaps 0x40(%arg1), \TMP1
-   AESENC \TMP1, %xmm\index  

Re: [PATCH 5/6] crypto: sparc64/md5 - fix module description

2015-01-11 Thread David Miller
From: Mathias Krause 
Date: Sun, 11 Jan 2015 18:17:46 +0100

> MD5 is not SHA1.
> 
> Cc: David S. Miller 
> Signed-off-by: Mathias Krause 

Acked-by: David S. Miller 
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/6] crypto: sparc64/des - add "des3_ede" module alias

2015-01-11 Thread David Miller
From: Mathias Krause 
Date: Sun, 11 Jan 2015 18:17:45 +0100

> This module provides implementations for "des3_ede", too. Announce those
> via an appropriate crypto module alias so it can be used in favour to
> the generic C implementation.
> 
> Cc: David S. Miller 
> Signed-off-by: Mathias Krause 

Acked-by: David S. Miller 
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/6] crypto: sparc64/aes - fix module description

2015-01-11 Thread David Miller
From: Mathias Krause 
Date: Sun, 11 Jan 2015 18:17:43 +0100

> AES is a block cipher, not a hash.
> 
> Cc: David S. Miller 
> Signed-off-by: Mathias Krause 

Acked-by: David S. Miller 
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/6] crypto: sparc64/camellia - fix module alias

2015-01-11 Thread David Miller
From: Mathias Krause 
Date: Sun, 11 Jan 2015 18:17:44 +0100

> The module alias should be "camellia", not "aes".
> 
> Cc: David S. Miller 
> Signed-off-by: Mathias Krause 

Acked-by: David S. Miller 
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] crypto: sparc64/md5 - fix module description

2015-01-11 Thread Mathias Krause
MD5 is not SHA1.

Cc: David S. Miller 
Signed-off-by: Mathias Krause 
---
 arch/sparc/crypto/md5_glue.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/crypto/md5_glue.c b/arch/sparc/crypto/md5_glue.c
index 64c7ff5f72a9..b688731d7ede 100644
--- a/arch/sparc/crypto/md5_glue.c
+++ b/arch/sparc/crypto/md5_glue.c
@@ -183,7 +183,7 @@ module_init(md5_sparc64_mod_init);
 module_exit(md5_sparc64_mod_fini);
 
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("MD5 Secure Hash Algorithm, sparc64 md5 opcode 
accelerated");
+MODULE_DESCRIPTION("MD5 Message Digest Algorithm, sparc64 md5 opcode 
accelerated");
 
 MODULE_ALIAS_CRYPTO("md5");
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/6] crypto: x86/des3_ede - drop bogus module aliases

2015-01-11 Thread Mathias Krause
This module implements variations of "des3_ede" only. Drop the bogus
module aliases for "des".

Cc: Jussi Kivilinna 
Signed-off-by: Mathias Krause 
---
 arch/x86/crypto/des3_ede_glue.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/crypto/des3_ede_glue.c b/arch/x86/crypto/des3_ede_glue.c
index 38a14f818ef1..d6fc59df 100644
--- a/arch/x86/crypto/des3_ede_glue.c
+++ b/arch/x86/crypto/des3_ede_glue.c
@@ -504,6 +504,4 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Triple DES EDE Cipher Algorithm, asm optimized");
 MODULE_ALIAS_CRYPTO("des3_ede");
 MODULE_ALIAS_CRYPTO("des3_ede-asm");
-MODULE_ALIAS_CRYPTO("des");
-MODULE_ALIAS_CRYPTO("des-asm");
 MODULE_AUTHOR("Jussi Kivilinna ");
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/6] crypto: add missing crypto module aliases

2015-01-11 Thread Mathias Krause
Commit 5d26a105b5a7 ("crypto: prefix module autoloading with "crypto-"")
changed the automatic module loading when requesting crypto algorithms
to prefix all module requests with "crypto-". This requires all crypto
modules to have a crypto specific module alias even if their file name
would otherwise match the requested crypto algorithm.

Even though commit 5d26a105b5a7 added those aliases for a vast amount of
modules, it was missing a few. Add the required MODULE_ALIAS_CRYPTO
annotations to those files to make them get loaded automatically, again.
This fixes, e.g., requesting 'ecb(blowfish-generic)', which used to work
with kernels v3.18 and below.

Also change MODULE_ALIAS() lines to MODULE_ALIAS_CRYPTO(). The former
won't work for crypto modules any more.

Fixes: 5d26a105b5a7 ("crypto: prefix module autoloading with "crypto-"")
Cc: Kees Cook 
Signed-off-by: Mathias Krause 
---
 arch/powerpc/crypto/sha1.c   |1 +
 arch/x86/crypto/sha-mb/sha1_mb.c |2 +-
 crypto/aes_generic.c |1 +
 crypto/ansi_cprng.c  |1 +
 crypto/blowfish_generic.c|1 +
 crypto/camellia_generic.c|1 +
 crypto/cast5_generic.c   |1 +
 crypto/cast6_generic.c   |1 +
 crypto/crc32c_generic.c  |1 +
 crypto/crct10dif_generic.c   |1 +
 crypto/des_generic.c |7 ---
 crypto/ghash-generic.c   |1 +
 crypto/krng.c|1 +
 crypto/salsa20_generic.c |1 +
 crypto/serpent_generic.c |1 +
 crypto/sha1_generic.c|1 +
 crypto/sha256_generic.c  |2 ++
 crypto/sha512_generic.c  |2 ++
 crypto/tea.c |1 +
 crypto/tgr192.c  |1 +
 crypto/twofish_generic.c |1 +
 crypto/wp512.c   |1 +
 22 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/crypto/sha1.c b/arch/powerpc/crypto/sha1.c
index d3feba5a275f..c154cebc1041 100644
--- a/arch/powerpc/crypto/sha1.c
+++ b/arch/powerpc/crypto/sha1.c
@@ -154,4 +154,5 @@ module_exit(sha1_powerpc_mod_fini);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm");
 
+MODULE_ALIAS_CRYPTO("sha1");
 MODULE_ALIAS_CRYPTO("sha1-powerpc");
diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index a225a5ca1037..fd9f6b035b16 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -931,4 +931,4 @@ module_exit(sha1_mb_mod_fini);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, multi buffer accelerated");
 
-MODULE_ALIAS("sha1");
+MODULE_ALIAS_CRYPTO("sha1");
diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c
index 9b3c54c1cbe8..3dd101144a58 100644
--- a/crypto/aes_generic.c
+++ b/crypto/aes_generic.c
@@ -1475,3 +1475,4 @@ module_exit(aes_fini);
 MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_ALIAS_CRYPTO("aes");
+MODULE_ALIAS_CRYPTO("aes-generic");
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index b4485a108389..6f5bebc9bf01 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -477,3 +477,4 @@ MODULE_PARM_DESC(dbg, "Boolean to enable debugging (0/1 == 
off/on)");
 module_init(prng_mod_init);
 module_exit(prng_mod_fini);
 MODULE_ALIAS_CRYPTO("stdrng");
+MODULE_ALIAS_CRYPTO("ansi_cprng");
diff --git a/crypto/blowfish_generic.c b/crypto/blowfish_generic.c
index 7bd71f02d0dd..87b392a77a93 100644
--- a/crypto/blowfish_generic.c
+++ b/crypto/blowfish_generic.c
@@ -139,3 +139,4 @@ module_exit(blowfish_mod_fini);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Blowfish Cipher Algorithm");
 MODULE_ALIAS_CRYPTO("blowfish");
+MODULE_ALIAS_CRYPTO("blowfish-generic");
diff --git a/crypto/camellia_generic.c b/crypto/camellia_generic.c
index 1b74c5a3e891..a02286bf319e 100644
--- a/crypto/camellia_generic.c
+++ b/crypto/camellia_generic.c
@@ -1099,3 +1099,4 @@ module_exit(camellia_fini);
 MODULE_DESCRIPTION("Camellia Cipher Algorithm");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_CRYPTO("camellia");
+MODULE_ALIAS_CRYPTO("camellia-generic");
diff --git a/crypto/cast5_generic.c b/crypto/cast5_generic.c
index 84c86db67ec7..df5c72629383 100644
--- a/crypto/cast5_generic.c
+++ b/crypto/cast5_generic.c
@@ -550,3 +550,4 @@ module_exit(cast5_mod_fini);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Cast5 Cipher Algorithm");
 MODULE_ALIAS_CRYPTO("cast5");
+MODULE_ALIAS_CRYPTO("cast5-generic");
diff --git a/crypto/cast6_generic.c b/crypto/cast6_generic.c
index f408f0bd8de2..058c8d755d03 100644
--- a/crypto/cast6_generic.c
+++ b/crypto/cast6_generic.c
@@ -292,3 +292,4 @@ module_exit(cast6_mod_fini);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Cast6 Cipher Algorithm");
 MODULE_ALIAS_CRYPTO("cast6");
+MODULE_ALIAS_CRYPTO("cast6-generic");
diff --git a/crypto/crc32c_generic.c b/crypto/crc32c_generic.c
index 2a062025749d..06f1b60f02b2 100644
--- a/crypto/crc32c_generic.c
+++ b/crypto/crc32c_generi

[PATCH 0/6] crypto: module alias fixes

2015-01-11 Thread Mathias Krause
Hi Herbert,

this series is a follow up to commit 5d26a105b5a7 ("crypto: prefix
module autoloading with "crypto-""). In patch 1 it adds the required
MODULE_ALIAS_CRYPTO annotation where needed to bring back automatic
crypto module loading. Namely, modules that have a file name matching
the cipher they implement still need the MODULE_ALIAS_CRYPTO()
annotation. Otherwise they won't get loaded.

Patches 2 to 6 fix bogus module descriptions or aliases with the
exception of patch 4 which adds a missing crypto module alias.

At least patch 1 should go to crypto-2.6 to not regress the crypto API
for v3.19 in regard to automatic module loading.

The others are probably safe to apply, too.

Please apply!

Thanks,

Mathias Krause (6):
  crypto: add missing crypto module aliases
  crypto: sparc64/aes - fix module description
  crypto: sparc64/camellia - fix module alias
  crypto: sparc64/des - add "des3_ede" module alias
  crypto: sparc64/md5 - fix module description
  crypto: x86/des3_ede - drop bogus module aliases

 arch/powerpc/crypto/sha1.c|1 +
 arch/sparc/crypto/aes_glue.c  |2 +-
 arch/sparc/crypto/camellia_glue.c |2 +-
 arch/sparc/crypto/des_glue.c  |1 +
 arch/sparc/crypto/md5_glue.c  |2 +-
 arch/x86/crypto/des3_ede_glue.c   |2 --
 arch/x86/crypto/sha-mb/sha1_mb.c  |2 +-
 crypto/aes_generic.c  |1 +
 crypto/ansi_cprng.c   |1 +
 crypto/blowfish_generic.c |1 +
 crypto/camellia_generic.c |1 +
 crypto/cast5_generic.c|1 +
 crypto/cast6_generic.c|1 +
 crypto/crc32c_generic.c   |1 +
 crypto/crct10dif_generic.c|1 +
 crypto/des_generic.c  |7 ---
 crypto/ghash-generic.c|1 +
 crypto/krng.c |1 +
 crypto/salsa20_generic.c  |1 +
 crypto/serpent_generic.c  |1 +
 crypto/sha1_generic.c |1 +
 crypto/sha256_generic.c   |2 ++
 crypto/sha512_generic.c   |2 ++
 crypto/tea.c  |1 +
 crypto/tgr192.c   |1 +
 crypto/twofish_generic.c  |1 +
 crypto/wp512.c|1 +
 27 files changed, 31 insertions(+), 9 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/6] crypto: sparc64/des - add "des3_ede" module alias

2015-01-11 Thread Mathias Krause
This module provides implementations for "des3_ede", too. Announce those
via an appropriate crypto module alias so it can be used in favour to
the generic C implementation.

Cc: David S. Miller 
Signed-off-by: Mathias Krause 
---
 arch/sparc/crypto/des_glue.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c
index d11500972994..dd6a34fa6e19 100644
--- a/arch/sparc/crypto/des_glue.c
+++ b/arch/sparc/crypto/des_glue.c
@@ -533,5 +533,6 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("DES & Triple DES EDE Cipher Algorithms, sparc64 des opcode 
accelerated");
 
 MODULE_ALIAS_CRYPTO("des");
+MODULE_ALIAS_CRYPTO("des3_ede");
 
 #include "crop_devid.c"
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/6] crypto: sparc64/aes - fix module description

2015-01-11 Thread Mathias Krause
AES is a block cipher, not a hash.

Cc: David S. Miller 
Signed-off-by: Mathias Krause 
---
 arch/sparc/crypto/aes_glue.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/crypto/aes_glue.c b/arch/sparc/crypto/aes_glue.c
index 705408766ab0..2e48eb8813ff 100644
--- a/arch/sparc/crypto/aes_glue.c
+++ b/arch/sparc/crypto/aes_glue.c
@@ -497,7 +497,7 @@ module_init(aes_sparc64_mod_init);
 module_exit(aes_sparc64_mod_fini);
 
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("AES Secure Hash Algorithm, sparc64 aes opcode 
accelerated");
+MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, sparc64 aes opcode 
accelerated");
 
 MODULE_ALIAS_CRYPTO("aes");
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/6] crypto: sparc64/camellia - fix module alias

2015-01-11 Thread Mathias Krause
The module alias should be "camellia", not "aes".

Cc: David S. Miller 
Signed-off-by: Mathias Krause 
---
 arch/sparc/crypto/camellia_glue.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/crypto/camellia_glue.c 
b/arch/sparc/crypto/camellia_glue.c
index 641f55cb61c3..6bf2479a12fb 100644
--- a/arch/sparc/crypto/camellia_glue.c
+++ b/arch/sparc/crypto/camellia_glue.c
@@ -322,6 +322,6 @@ module_exit(camellia_sparc64_mod_fini);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Camellia Cipher Algorithm, sparc64 camellia opcode 
accelerated");
 
-MODULE_ALIAS_CRYPTO("aes");
+MODULE_ALIAS_CRYPTO("camellia");
 
 #include "crop_devid.c"
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 1/2] crypto: AF_ALG: add AEAD support

2015-01-11 Thread Stephan Mueller
Am Sonntag, 11. Januar 2015, 04:45:53 schrieb Stephan Mueller:

Hi Herbert,

> +static int aead_accept_parent(void *private, struct sock *sk)
> +{
> + struct aead_ctx *ctx;
> + struct alg_sock *ask = alg_sk(sk);
> + unsigned int len = sizeof(*ctx) + crypto_aead_reqsize(private);
> + unsigned int ivlen = crypto_aead_ivsize(private);
> +
> + ctx = sock_kmalloc(sk, len, GFP_KERNEL);
> + if (!ctx)
> + return -ENOMEM;
> + memset(ctx, 0, len);
> +
> + ctx->iv = sock_kmalloc(sk, ivlen, GFP_KERNEL);
> + if (!ctx->iv) {
> + sock_kfree_s(sk, ctx, len);
> + return -ENOMEM;
> + }
> + memset(ctx->iv, 0, ivlen);
> +
> + ctx->len = len;
> + ctx->used = 0;
> + ctx->more = 0;
> + ctx->merge = 0;
> + ctx->enc = 0;
> + ctx->tsgl.cur = 0;

ctx->trunc = 0;

is missing here.

I would wait with a new patch once you had the chance to review the updates 
and provide comments.

Thanks
-- 
Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html