[PATCH 2/4] crypto: geode: Kill AES_IV_LENGTH

2014-05-14 Thread Marek Vasut
The AES IV length is always 128bits, just use the define from aes.h Signed-off-by: Marek Vasut ma...@denx.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Dmitry Kasatkin dmitry.kasat...@nokia.com Cc: Eric Bénard e...@eukrea.com Cc: Jussi Kivilinna jussi.kivili...@mbnet.fi Cc: Kent

[PATCH 1/4] crypto: geode: Kill AES_MIN_BLOCK_SIZE

2014-05-14 Thread Marek Vasut
This is actually defined in include/crypto/aes.h , no need to have a a different symbol for the same thing twice. Signed-off-by: Marek Vasut ma...@denx.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Dmitry Kasatkin dmitry.kasat...@nokia.com Cc: Eric Bénard e...@eukrea.com Cc: Jussi

[PATCH 4/4] crypto: geode: Weed out printk() from probe()

2014-05-14 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Dmitry Kasatkin dmitry.kasat...@nokia.com Cc: Eric Bénard e...@eukrea.com Cc: Jussi Kivilinna jussi.kivili...@mbnet.fi Cc: Kent Yoder k...@linux.vnet.ibm.com Cc: Michal Ludvig mic...@logix.cz Cc: Varun

[PATCH 3/7] crypto: cesa: Don't use tfm-__crt_alg-cra_name directly

2014-05-14 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de --- drivers/crypto/mv_cesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) NOTE: I didn't compile-test those, but the change should not break anything. If possible, please test on relevant hardware. diff --git a/drivers/crypto/mv_cesa.c

[PATCH 1/7] crypto: geode: Don't use tfm-__crt_alg-cra_name directly

2014-05-14 Thread Marek Vasut
Use a standard accessor instead of directly digging into a structure. Signed-off-by: Marek Vasut ma...@denx.de --- drivers/crypto/geode-aes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) NOTE: I didn't compile-test those, but the change should not break anything. If possible,

[PATCH 4/7] crypto: dcp: Don't use tfm-__crt_alg-cra_name directly

2014-05-14 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de --- drivers/crypto/mxs-dcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) NOTE: I didn't compile-test those, but the change should not break anything. If possible, please test on relevant hardware. diff --git a/drivers/crypto/mxs-dcp.c

[PATCH 2/7] crypto: ccp: Don't use tfm-__crt_alg-cra_name directly

2014-05-14 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de --- drivers/crypto/ccp/ccp-crypto-aes-xts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) NOTE: I didn't compile-test those, but the change should not break anything. If possible, please test on relevant hardware. diff --git

[PATCH 5/7] crypto: n2: Don't use tfm-__crt_alg-cra_name directly

2014-05-14 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de --- drivers/crypto/n2_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) NOTE: I didn't compile-test those, but the change should not break anything. If possible, please test on relevant hardware. diff --git a/drivers/crypto/n2_core.c

[PATCH 6/7] crypto: padlock: Don't use tfm-__crt_alg-cra_name directly

2014-05-14 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de --- drivers/crypto/padlock-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) NOTE: I didn't compile-test those, but the change should not break anything. If possible, please test on relevant hardware. diff --git

[PATCH] [RFC] crypto: cesa: Don't use tfm-__crt_alg-cra_type directly

2014-05-14 Thread Marek Vasut
The checking for the type of algorithm implementation is pretty strange here. Use regular flags to check for the type instead. Signed-off-by: Marek Vasut ma...@denx.de Cc: Bill Pemberton wf...@virginia.edu Cc: Herbert Xu herb...@gondor.apana.org.au Cc: Kent Yoder k...@linux.vnet.ibm.com Cc: Jamie

Re: [PATCH 2/6] crypto: SHA1 multibuffer crypto hash infrastructure

2014-05-14 Thread Tim Chen
On Wed, 2014-05-14 at 08:10 +0800, Herbert Xu wrote: On Tue, May 13, 2014 at 04:19:45PM -0700, Tim Chen wrote: diff --git a/crypto/shash.c b/crypto/shash.c index 929058a..6f40424 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -229,6 +229,42 @@ int shash_ahash_update(struct

[PATCH v2 03/11] arm64/crypto: GHASH secure hash using ARMv8 Crypto Extensions

2014-05-14 Thread Ard Biesheuvel
This is a port to ARMv8 (Crypto Extensions) of the Intel implementation of the GHASH Secure Hash (used in the Galois/Counter chaining mode). It relies on the optional PMULL/PMULL2 instruction (polynomial multiply long, what Intel call carry-less multiply). Signed-off-by: Ard Biesheuvel

[PATCH v2 06/11] arm64: pull in asm/simd.h from asm-generic

2014-05-14 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 83f71b3004a8..42c7eecd2bb6 100644 --- a/arch/arm64/include/asm/Kbuild +++

[PATCH v2 05/11] arm64/crypto: AES in CCM mode using ARMv8 Crypto Extensions

2014-05-14 Thread Ard Biesheuvel
This patch adds support for the AES-CCM encryption algorithm for CPUs that have support for the AES part of the ARM v8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Acked-by: Herbert Xu herb...@gondor.apana.org.au --- arch/arm64/crypto/Kconfig | 7 +

[PATCH v2 02/11] arm64/crypto: SHA-224/SHA-256 using ARMv8 Crypto Extensions

2014-05-14 Thread Ard Biesheuvel
This patch adds support for the SHA-224 and SHA-256 Secure Hash Algorithms for CPUs that have support for the SHA-2 part of the ARM v8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Acked-by: Herbert Xu herb...@gondor.apana.org.au --- arch/arm64/crypto/Kconfig

[PATCH v2 00/11] arm64 crypto roundup

2014-05-14 Thread Ard Biesheuvel
This is another repost of the arm64 crypto patches, this time I have only included the ones that go under arch/arm64/crypto. Changes wrt previous version: - updated the voluntary preemption patches to test for CRYPTO_TFM_REQ_MAY_SLEEP instead of !in_interrupt() - added Herbert's ack All

[PATCH v2 08/11] arm64/crypto: add shared macro to test for NEED_RESCHED

2014-05-14 Thread Ard Biesheuvel
This adds the asm macro definition 'b_if_no_resched' that performs a conditional branch depending on the preempt need_resched state. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/include/asm/assembler.h | 21 + 1 file changed, 21 insertions(+) diff

[PATCH v2 07/11] arm64/crypto: AES-ECB/CBC/CTR/XTS using ARMv8 NEON and Crypto Extensions

2014-05-14 Thread Ard Biesheuvel
This adds ARMv8 implementations of AES in ECB, CBC, CTR and XTS modes, both for ARMv8 with Crypto Extensions and for plain ARMv8 NEON. The Crypto Extensions version can only run on ARMv8 implementations that have support for these optional extensions. The plain NEON version is a table based yet

[PATCH v2 09/11] arm64/crypto: add voluntary preemption to Crypto Extensions SHA1

2014-05-14 Thread Ard Biesheuvel
The Crypto Extensions based SHA1 implementation uses the NEON register file, and hence runs with preemption disabled. This patch adds a TIF_NEED_RESCHED check to its inner loop so we at least give up the CPU voluntarily when we are running in process context and have been tagged for preemption by

[PATCH v2 01/11] arm64/crypto: SHA-1 using ARMv8 Crypto Extensions

2014-05-14 Thread Ard Biesheuvel
This patch adds support for the SHA-1 Secure Hash Algorithm for CPUs that have support for the SHA-1 part of the ARM v8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Acked-by: Herbert Xu herb...@gondor.apana.org.au --- arch/arm64/Kconfig | 3 +

[PATCH v2 10/11] arm64/crypto: add voluntary preemption to Crypto Extensions SHA2

2014-05-14 Thread Ard Biesheuvel
The Crypto Extensions based SHA2 implementation uses the NEON register file, and hence runs with preemption disabled. This patch adds a TIF_NEED_RESCHED check to its inner loop so we at least give up the CPU voluntarily when we are running in process context and have been tagged for preemption by

[PATCH v2 04/11] arm64/crypto: AES using ARMv8 Crypto Extensions

2014-05-14 Thread Ard Biesheuvel
This patch adds support for the AES symmetric encryption algorithm for CPUs that have support for the AES part of the ARM v8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Acked-by: Herbert Xu herb...@gondor.apana.org.au --- arch/arm64/crypto/Kconfig | 7 +-