Re: [PATCH] crypto: user - Allow CRYPTO_MSG_GETALG without CAP_NET_ADMIN

2014-05-01 Thread Marek Vasut
On Wednesday, April 30, 2014 at 09:23:40 PM, Matthias-Christian Ott wrote: On 04/28/14 23:37, Marek Vasut wrote: On Friday, April 25, 2014 at 12:51:06 AM, Matthias-Christian Ott wrote: CRYPTO_USER requires CAP_NET_ADMIN for all operations. Most information provided by CRYPTO_MSG_GETALG is

[PATCH resend 00/15] arm64 crypto roundup

2014-05-01 Thread Ard Biesheuvel
This is a repost of the arm64 crypto patches that I have posted to the LAKML over the past months. They have now been verified on actual hardware (Cortex-A57) so if there are no remaining issues I would like to propose them for 3.16. Ard Biesheuvel (15): asm-generic: allow generic unaligned

[PATCH resend 07/15] arm64/crypto: GHASH secure hash using ARMv8 Crypto Extensions

2014-05-01 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 resend 06/15] arm64/crypto: SHA-224/SHA-256 using ARMv8 Crypto Extensions

2014-05-01 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 --- arch/arm64/crypto/Kconfig| 5 + arch/arm64/crypto/Makefile | 3 +

[PATCH resend 08/15] arm64/crypto: AES using ARMv8 Crypto Extensions

2014-05-01 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 --- arch/arm64/crypto/Kconfig | 7 +- arch/arm64/crypto/Makefile| 3 +

[PATCH resend 09/15] arm64/crypto: AES in CCM mode using ARMv8 Crypto Extensions

2014-05-01 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 resend 03/15] arm64: defer reloading a task's FPSIMD state to userland resume

2014-05-01 Thread Ard Biesheuvel
If a task gets scheduled out and back in again and nothing has touched its FPSIMD state in the mean time, there is really no reason to reload it from memory. Similarly, repeated calls to kernel_neon_begin() and kernel_neon_end() will preserve and restore the FPSIMD state every time. This patch

[PATCH resend 04/15] arm64: add support for kernel mode NEON in interrupt context

2014-05-01 Thread Ard Biesheuvel
This patch modifies kernel_neon_begin() and kernel_neon_end(), so they may be called from any context. To address the case where only a couple of registers are needed, kernel_neon_begin_partial(u32) is introduced which takes as a parameter the number of bottom 'n' NEON q-registers required. To

[PATCH resend 05/15] arm64/crypto: SHA-1 using ARMv8 Crypto Extensions

2014-05-01 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 --- arch/arm64/Kconfig | 3 + arch/arm64/Makefile | 1 +

[PATCH resend 02/15] arm64: add abstractions for FPSIMD state manipulation

2014-05-01 Thread Ard Biesheuvel
There are two tacit assumptions in the FPSIMD handling code that will no longer hold after the next patch that optimizes away some FPSIMD state restores: . the FPSIMD registers of this CPU contain the userland FPSIMD state of task 'current'; . when switching to a task, its FPSIMD state will

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

2014-05-01 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 resend 15/15] arm64/crypto: add voluntary preemption to Crypto Extensions GHASH

2014-05-01 Thread Ard Biesheuvel
The Crypto Extensions based GHASH 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 resend 12/15] arm64/crypto: add shared macro to test for NEED_RESCHED

2014-05-01 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 resend 10/15] arm64: pull in asm/simd.h from asm-generic

2014-05-01 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 resend 13/15] arm64/crypto: add voluntary preemption to Crypto Extensions SHA1

2014-05-01 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 resend 14/15] arm64/crypto: add voluntary preemption to Crypto Extensions SHA2

2014-05-01 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

Re: [PATCH] crypto:caam - Modify width of few read only registers

2014-05-01 Thread Kim Phillips
On Tue, 29 Apr 2014 15:34:37 +0530 Ruchika Gupta ruchika.gu...@freescale.com wrote: Few read only registers like CHAVID, CTPR etc were wrongly defined as 64 bit registers. This functioned properly on the powerpc platforms. However ARM SoC's wouldn't function correctly if these registers are

Re: [PATCH] crypto:caam - Define setbits32() and clrbits32() for ARM in the Freescale CAAM driver

2014-05-01 Thread Kim Phillips
On Tue, 29 Apr 2014 15:41:39 +0530 Ruchika Gupta ruchika.gu...@freescale.com wrote: The kernel defines setbits32() and clrbits32() macros only for Power-based architectures. This patch modifies the Freescale CAAM driver to add macros for use on ARM architectures. Signed-off-by: Victoria