[PATCH v2 00/14] crypto: SHA glue code consolidation

2015-03-30 Thread Ard Biesheuvel
Hello all, This is v2 of what is now a complete glue code consolidation series for generic, x86, arm and arm64 implementations of SHA-1, SHA-224/256 and SHA-384/512. The base layer implements all the update and finalization logic around the block transforms, where the prototypes of the latter loo

[PATCH v2 01/14] crypto: sha512: implement base layer for SHA-512

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[PATCH v2 05/14] crypto: sha256-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. It also implements a .finup hook crypto_sha256_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/sha256_generic.c | 139 ++---

[PATCH v2 03/14] crypto: sha1: implement base layer for SHA-1

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-1 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[PATCH v2 04/14] crypto: sha512-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. It also implements a .finup hook crypto_sha512_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/sha512_generic.c | 126 ++---

[PATCH v2 06/14] crypto: sha1-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-1 implementation to use the generic shared SHA-1 glue code. It also implements a .finup hook crypto_sha1_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig| 1 + crypto/sha1_generic.c | 105 ---

[RFC PATCH 5/6] arm64/crypto: move ARMv8 SHA-224/256 driver to SHA-256 base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha2-ce-core.S | 11 +- arch/arm64/crypto/sha2-ce-glue.c | 211 ++- 3 files changed, 40 insertions(+), 183 deletions(-) diff --git a/arch/arm64/crypto/Kconfig b/arch

[PATCH v2 08/14] crypto/arm: move SHA-1 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig| 2 +- arch/arm/crypto/sha1-ce-glue.c | 110 +++-- 2 files changed, 31 insertions(+), 81 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig index c111d8992afb..31ad19f

[RFC PATCH 3/6] crypto: sha256: implement base layer for SHA-256

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[RFC PATCH 2/6] crypto: sha512-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/sha512_generic.c | 117 +++- 2 files changed, 16 insertions(+), 102 deletions(-) dif

[PATCH v2 07/14] crypto/arm: move SHA-1 ARM asm implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig | 1 + arch/arm/{include/asm => }/crypto/sha1.h | 3 + arch/arm/crypto/sha1_glue.c | 117 +++ 3 files changed, 28 insertions(+), 93 deletions(-) rename arch/arm/{include/asm =>

[PATCH v2 09/14] crypto/arm: move SHA-224/256 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig| 1 + arch/arm/crypto/sha2-ce-glue.c | 151 + 2 files changed, 33 insertions(+), 119 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig index 31ad19f18af2..de91f04

[RFC PATCH 6/6] arm/crypto: accelerated SHA-512 using ARM generic ASM and NEON

2015-03-30 Thread Ard Biesheuvel
This updates the SHA-512 NEON module with the faster and more versatile implementation from the OpenSSL project. It consists of both a NEON and a generic ASM version of the core SHA-512 transform, where the NEON version reverts to the ASM version when invoked in non-process context. Performance re

[PATCH v2 02/14] crypto: sha256: implement base layer for SHA-256

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[RFC PATCH 4/6] crypto: sha256-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/sha256_generic.c | 131 +++- 2 files changed, 18 insertions(+), 114 deletions(-) diff --

[PATCH v2 resend 05/14] crypto: sha256-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. It also implements a .finup hook crypto_sha256_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/sha256_generic.c | 139 ++---

[PATCH v2 resend 07/14] crypto/arm: move SHA-1 ARM asm implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig | 1 + arch/arm/{include/asm => }/crypto/sha1.h | 3 + arch/arm/crypto/sha1_glue.c | 117 +++ 3 files changed, 28 insertions(+), 93 deletions(-) rename arch/arm/{include/asm =>

[PATCH v2 resend 03/14] crypto: sha1: implement base layer for SHA-1

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-1 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[PATCH v2 resend 04/14] crypto: sha512-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. It also implements a .finup hook crypto_sha512_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig | 1 + crypto/sha512_generic.c | 126 ++---

[PATCH v2 resend 01/14] crypto: sha512: implement base layer for SHA-512

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[PATCH v2 resend 02/14] crypto: sha256: implement base layer for SHA-256

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig

[PATCH v2 resend 06/14] crypto: sha1-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-1 implementation to use the generic shared SHA-1 glue code. It also implements a .finup hook crypto_sha1_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel --- crypto/Kconfig| 1 + crypto/sha1_generic.c | 105 ---

[PATCH v2 resend 00/14] crypto: SHA glue code consolidation

2015-03-30 Thread Ard Biesheuvel
NOTE: I appear to have screwed up something when I just sent this, so resending now with no patches missing and no duplicates. Hello all, This is v2 of what is now a complete glue code consolidation series for generic, x86, arm and arm64 implementations of SHA-1, SHA-224/256 and SHA-384/512

[PATCH v2 resend 12/14] crypto/x86: move SHA-1 SSSE3 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/x86/crypto/sha1_ssse3_glue.c | 139 +- crypto/Kconfig| 1 + 2 files changed, 34 insertions(+), 106 deletions(-) diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c ind

[PATCH v2 resend 08/14] crypto/arm: move SHA-1 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig| 2 +- arch/arm/crypto/sha1-ce-glue.c | 110 +++-- 2 files changed, 31 insertions(+), 81 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig index c111d8992afb..31ad19f

[PATCH v2 resend 11/14] crypto/arm64: move SHA-224/256 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha2-ce-core.S | 11 ++- arch/arm64/crypto/sha2-ce-glue.c | 208 ++- 3 files changed, 38 insertions(+), 182 deletions(-) diff --git a/arch/arm64/crypto/Kconfig b/arc

[PATCH v2 resend 13/14] crypto/x86: move SHA-224/256 SSSE3 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/x86/crypto/sha256_ssse3_glue.c | 186 crypto/Kconfig | 1 + 2 files changed, 39 insertions(+), 148 deletions(-) diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue

[PATCH v2 resend 14/14] crypto/x86: move SHA-384/512 SSSE3 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/x86/crypto/sha512_ssse3_glue.c | 195 +++- crypto/Kconfig | 1 + 2 files changed, 39 insertions(+), 157 deletions(-) diff --git a/arch/x86/crypto/sha512_ssse3_glue.c b/arch/x86/crypto/sha512_ssse3_glue

[PATCH v2 resend 09/14] crypto/arm: move SHA-224/256 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig| 1 + arch/arm/crypto/sha2-ce-glue.c | 151 + 2 files changed, 33 insertions(+), 119 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig index 31ad19f18af2..de91f04

[PATCH v2 resend 10/14] crypto/arm64: move SHA-1 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha1-ce-core.S | 11 ++-- arch/arm64/crypto/sha1-ce-glue.c | 132 +++ 3 files changed, 31 insertions(+), 113 deletions(-) diff --git a/arch/arm64/crypto/Kconfig b/ar

[PATCH v2 1/6] crypto/ccp: drop linux/pci dependencies

2015-03-30 Thread Michael S. Tsirkin
pci code is in ccp-pci.c, don't include pci headers from ccp/ccp-ops.c. Signed-off-by: Michael S. Tsirkin --- drivers/crypto/ccp/ccp-ops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index 8729364..3da1140 100644 --- a/drivers/

Re: [PATCH v2 02/20] crypto: testmgr to use CRYPTO_ALG_INTERNAL

2015-03-30 Thread Herbert Xu
On Fri, Mar 27, 2015 at 11:50:42PM +0100, Stephan Mueller wrote: > If a cipher allocation fails with -ENOENT, the testmgr now retries > to allocate the cipher with CRYPTO_ALG_INTERNAL flag. > > As all ciphers, including the internal ciphers will be processed by > the testmgr, it needs to be able t

problem with testing a CTR block cipher mode which is partially working

2015-03-30 Thread Corentin LABBE
hello I am trying to add the CTR (counter) block cipher mode for AES on my Security System driver. When testing with the tcrypt module I got the following result: [ 1256.986989] alg: skcipher: Test 1 failed on encryption for ctr-aes-sunxi-ss [ 1256.987004] : 87 4d 61 91 b6 20 e3 26 1b ef

AW: problem with testing a CTR block cipher mode which is partially working

2015-03-30 Thread Markus Stockhausen
> Von: linux-crypto-ow...@vger.kernel.org > [linux-crypto-ow...@vger.kernel.org]" im Auftrag von "Corentin > LABBE [clabbe.montj...@gmail.com] > Gesendet: Montag, 30. März 2015 19:59 > An: linux-crypto@vger.kernel.org > Cc: linux-su...@googlegroups.com > Betreff: problem with testing a CTR block

Re: AW: problem with testing a CTR block cipher mode which is partially working

2015-03-30 Thread Stephan Mueller
Am Montag, 30. März 2015, 18:08:28 schrieb Markus Stockhausen: Hi Markus, > > Von: linux-crypto-ow...@vger.kernel.org > > [linux-crypto-ow...@vger.kernel.org]" im Auftrag von "Corentin > > LABBE [clabbe.montj...@gmail.com] Gesendet: Montag, 30. März 2015 19:59 > > An: linux-crypto@vger.kernel.org

Re: [PATCH v2 02/20] crypto: testmgr to use CRYPTO_ALG_INTERNAL

2015-03-30 Thread Stephan Mueller
Am Dienstag, 31. März 2015, 00:10:34 schrieb Herbert Xu: Hi Herbert, > On Fri, Mar 27, 2015 at 11:50:42PM +0100, Stephan Mueller wrote: > > If a cipher allocation fails with -ENOENT, the testmgr now retries > > to allocate the cipher with CRYPTO_ALG_INTERNAL flag. > > > > As all ciphers, includi

[PATCH v3 11/20] crypto: mark CAST6 helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all CAST6 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/cast6_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x8

[PATCH v3 14/20] crypto: mark Serpent SSE2 helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all Serpent SSE2 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/serpent_sse2_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/serpent_sse2_glu

[PATCH v3 00/20] crypto: restrict usage of helper ciphers

2015-03-30 Thread Stephan Mueller
Hi, Based on the discussion in the thread [1], a flag is added to the kernel crypto API to allow ciphers to be marked as internal. The patch set is tested in FIPS and non-FIPS mode. In addition, the enforcement that the helper cipher of __driver-gcm-aes-aesni cannot be loaded, but the wrapper of

[PATCH v3 17/20] crypto: mark ARMv8 AES helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all ARMv8 AES helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/arm/crypto/aes-ce-glue.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/cryp

[PATCH v3 01/20] crypto: prevent helper ciphers from being used

2015-03-30 Thread Stephan Mueller
Several hardware related cipher implementations are implemented as follows: a "helper" cipher implementation is registered with the kernel crypto API. Such helper ciphers are never intended to be called by normal users. In some cases, calling them via the normal crypto API may even cause failures

[PATCH v3 16/20] crypto: mark NEON bit sliced AES helper ciphers

2015-03-30 Thread Stephan Mueller
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 --- 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/

[PATCH v3 15/20] crypto: mark Twofish AVX helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all Twofish AVX helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/twofish_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/twofish_avx_glue.c

[PATCH v3 19/20] crypto: mcryptd to process CRYPTO_ALG_INTERNAL

2015-03-30 Thread Stephan Mueller
The mcryptd is used as a wrapper around internal ciphers. Therefore, the mcryptd must process the internal cipher by marking mcryptd as internal if the underlying cipher is an internal cipher. Signed-off-by: Stephan Mueller --- crypto/mcryptd.c | 25 +++-- 1 file changed, 23

[PATCH v3 10/20] crypto: mark AVX Camellia helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all AVX Camellia helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/camellia_aesni_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/camellia_a

[PATCH v3 04/20] crypto: /proc/crypto: identify internal ciphers

2015-03-30 Thread Stephan Mueller
With ciphers that now cannot be accessed via the kernel crypto API, callers shall be able to identify the ciphers that are not callable. The /proc/crypto file is added a boolean field identifying that such internal ciphers. Signed-off-by: Stephan Mueller --- crypto/proc.c | 3 +++ 1 file changed

[PATCH v3 02/20] crypto: testmgr to use CRYPTO_ALG_INTERNAL

2015-03-30 Thread Stephan Mueller
Allocate the ciphers irrespectively if they are marked as internal or not. As all ciphers, including the internal ciphers will be processed by the testmgr, it needs to be able to allocate those ciphers. Signed-off-by: Stephan Mueller --- crypto/testmgr.c | 14 +++--- 1 file changed, 7 in

[PATCH v3 20/20] crypto: mark Multi buffer SHA1 helper cipher

2015-03-30 Thread Stephan Mueller
Flag all Multi buffer SHA1 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/sha-mb/sha1_mb.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/

[PATCH v3 03/20] crypto: cryptd to process CRYPTO_ALG_INTERNAL

2015-03-30 Thread Stephan Mueller
The cryptd is used as a wrapper around internal ciphers. Therefore, the cryptd must process the internal cipher by marking cryptd as internal if the underlying cipher is an internal cipher. Signed-off-by: Stephan Mueller --- crypto/ablk_helper.c | 3 ++- crypto/cryptd.c | 49 ++

[PATCH v3 18/20] crypto: mark 64 bit ARMv8 AES helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all 64 bit ARMv8 AES helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/arm64/crypto/aes-glue.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/crypto/aes-glue.c b/arch/arm

[PATCH v3 06/20] crypto: mark ghash clmulni helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all ash clmulni helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/ghash-clmulni-intel_glue.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/crypto/ghash-clmulni-intel_

[PATCH v3 07/20] crypto: mark GHASH ARMv8 vmull.p64 helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all GHASH ARMv8 vmull.p64 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/arm/crypto/ghash-ce-glue.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/crypto/ghash-ce-glue.c b/arch

[PATCH v3 08/20] crypto: mark AES-NI Camellia helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all AES-NI Camellia helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/camellia_aesni_avx2_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/camell

[PATCH v3 05/20] crypto: mark AES-NI helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all AES-NI helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/aesni-intel_glue.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_glu

[PATCH v3 13/20] crypto: mark Serpent AVX helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all Serpent AVX helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/serpent_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/serpent_avx_glue.c

[PATCH v3 09/20] crypto: mark CAST5 helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all CAST5 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/cast5_avx_glue.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto

[PATCH v3 12/20] crypto: mark Serpent AVX2 helper ciphers

2015-03-30 Thread Stephan Mueller
Flag all Serpent AVX2 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller --- arch/x86/crypto/serpent_avx2_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/serpent_avx2_glu

[PATCH net-next] crypto: algif - explicitly mark end of data

2015-03-30 Thread Tadeusz Struk
After the TX sgl is expanded we need to explicitly mark end of data at the last buffer that contains data. Signed-off-by: Tadeusz Struk --- crypto/algif_skcipher.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.

[PATCH net-next] crypto: af_alg - make exports consistant

2015-03-30 Thread Tadeusz Struk
Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL. Signed-off-by: Tadeusz Struk --- crypto/af_alg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 26089d1..f22cc56 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -381,7 +381,7 @@

[PATCH net-next] crypto: algif - use kmalloc instead of kzalloc

2015-03-30 Thread Tadeusz Struk
No need to use kzalloc to allocate sgls as the structure is initialized anyway. Signed-off-by: Tadeusz Struk --- crypto/algif_skcipher.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 9492dd5..5fd631f 100644 --- a/cr

[PATCH] crypto: omap-sham: Check for HIGHMEM before mapping SG pages

2015-03-30 Thread Lokesh Vutla
Commit 26a05489ee0e ("crypto: omap-sham - Map SG pages if they are HIGHMEM before accessing") says that HIGHMEM pages may not be mapped so we must kmap them before accessing, but it doesn't check whether the corresponding page is in highmem or not. Because of this all the crypto tests are failing.

[PATCH] crypto: omap-aes: Fix support for unequal lengths

2015-03-30 Thread Lokesh Vutla
For cases where total length of an input SGs is not same as length of the input data for encryption, omap-aes driver crashes. This happens in the case when IPsec is trying to use omap-aes driver. To avoid this, we copy all the pages from the input SG list into a contiguous buffer and prepare a sin

[PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()

2015-03-30 Thread Lokesh Vutla
omap_sham_handle_queue() can be called as part of done_task tasklet. During this its atomic and any calls to pm functions cannot sleep. But there is a call to pm_runtime_get_sync() (which can sleep) in omap_sham_handle_queue(), because of which the following appears: " [ 116.169969] BUG: scheduli