Re: [PATCH V3 1/2] crypto: Add Imagination Technologies hw hash accelerator

2015-03-08 Thread Stephan Mueller
Am Freitag, 6. März 2015, 02:58:26 schrieb James Hartley: Hi James, >This adds support for the Imagination Technologies hash >accelerator which provides hardware acceleration for >SHA1 SHA224 SHA256 and MD5 hashes. > >Signed-off-by: James Hartley >--- > drivers/crypto/Kconfig| 14 + > drive

Crypto Fixes for 4.0

2015-03-08 Thread Herbert Xu
Hi Linus: This push fixes a bug in the ARM XTS implementation that can cause failures to in decrypting encrypted disks. Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git or master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git Ard Biesheuvel (

Re: [PATCH V3 1/2] crypto: Add Imagination Technologies hw hash accelerator

2015-03-08 Thread Andrew Bresticker
Hi James, On Thu, Mar 5, 2015 at 7:01 PM, James Hartley wrote: > This adds support for the Imagination Technologies hash > accelerator which provides hardware acceleration for > SHA1 SHA224 SHA256 and MD5 hashes. > > Signed-off-by: James Hartley Some general comments below, I'll leave review of

[PATCH 5/7] crypto: octeon - add SHA256 module

2015-03-08 Thread Aaro Koskinen
Add OCTEON SHA256 module. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/crypto/Makefile| 1 + arch/mips/cavium-octeon/crypto/octeon-sha256.c | 280 + 2 files changed, 281 insertions(+) create mode 100644 arch/mips/cavium-octeon/crypto/octeon-sha256.c

[PATCH 1/7] crypto: octeon - don't disable bottom half in octeon-md5

2015-03-08 Thread Aaro Koskinen
Don't disable bottom half while the crypto engine is in use, as it should be unnecessary: All kernel crypto engine usage is wrapped with crypto engine state save/restore, so if we get interrupted by softirq that uses crypto they should save and restore our context. This actually fixes an issue whe

[PATCH 2/7] crypto: octeon - always disable preemption when using crypto engine

2015-03-08 Thread Aaro Koskinen
Always disable preemption on behalf of the drivers when crypto engine is taken into use. This will simplify the usage. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/crypto/octeon-crypto.c | 4 +++- arch/mips/cavium-octeon/crypto/octeon-md5.c| 4 2 files changed, 3 insertions(

[PATCH 7/7] crypto: octeon - enable OCTEON SHA1/256/512 module selection

2015-03-08 Thread Aaro Koskinen
Enable user to select OCTEON SHA1/256/512 modules. Signed-off-by: Aaro Koskinen --- crypto/Kconfig | 27 +++ 1 file changed, 27 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 50f4da4..38b2315 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -546,6 +5

[PATCH 6/7] crypto: octeon - add SHA512 module

2015-03-08 Thread Aaro Koskinen
Add OCTEON SHA512 module. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/crypto/Makefile| 1 + arch/mips/cavium-octeon/crypto/octeon-sha512.c | 277 + 2 files changed, 278 insertions(+) create mode 100644 arch/mips/cavium-octeon/crypto/octeon-sha512.c

[PATCH 3/7] crypto: octeon - add instruction definitions for SHA1/256/512

2015-03-08 Thread Aaro Koskinen
Add instruction definitions for SHA1/256/512. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/crypto/octeon-crypto.h | 83 -- 1 file changed, 79 insertions(+), 4 deletions(-) diff --git a/arch/mips/cavium-octeon/crypto/octeon-crypto.h b/arch/mips/cavium-octeon/

[PATCH 0/7] crypto: OCTEON MD5 bugfix + SHA modules

2015-03-08 Thread Aaro Koskinen
Hi, The first patch is a bug fix for OCTEON MD5 aimed for 4.0-rc cycle. The remaining patches add SHA1/SHA256/SHA512 modules. I have tested these on the following OCTEON boards and CPUs with 4.0-rc2: D-Link DSR-1000N: CN5010p1.1-500-SCP EdgeRouter Lite:CN5020p1.1-50

[PATCH] crypto: AES-NI: fix memory usage in GCM decryption

2015-03-08 Thread Stephan Mueller
The RFC4106 GCM decryption operation tries to overwrite cryptlen memory in req->dst. As the destination buffer for decryption only needs to hold the plaintext memory but cryptlen references the input buffer holding (ciphertext || authentication tag), the assumption of the destination buffer length

Re: [PATCH 00/10] omap3 crypto fixes

2015-03-08 Thread Paul Walmsley
On Sun, 8 Mar 2015, Pali Rohár wrote: > On Friday 06 March 2015 23:23:06 Aaro Koskinen wrote: > > On Fri, Mar 06, 2015 at 10:36:32AM -0800, Tony Lindgren wrote: > > > Are there any fixes in this series that should go into > > > v4.0-rc series, or can it all wait for v4.1? > > > > I think these al

Re: [PATCH RESEND 0/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-08 Thread Stephan Mueller
Am Freitag, 27. Februar 2015, 11:35:38 schrieb Tadeusz Struk: Hi Tadeusz, > The way the algif_skcipher works currently is that on sendmsg/sendpage it > builds an sgl for the input data and then on read/recvmsg it sends the job > for encryption putting the user to sleep till the data is processed.

Re: tcrypt.ko module usage

2015-03-08 Thread sri sowj
HI Stephan, Thank you very much for the information provided. It was a great help with quick response, I really appreciate your efforts and the time. If possible can you please help me to understand on how to handle backlog messages from crypto kernel driver? BR, Srisowj On Sun, Mar 8, 2015 at

Re: tcrypt.ko module usage

2015-03-08 Thread Stephan Mueller
Am Sonntag, 8. März 2015, 14:32:53 schrieb sri sowj: Hi sri, > HI All, > > > As I understand tcrypt.ko module purpose is to test different crypto > algorithm from the kenrel space. Please can some one help me with > below queries to understand tcrypt use cases. > > #1:If one need to test crypt

Re: [PATCH 00/10] omap3 crypto fixes

2015-03-08 Thread Pali Rohár
On Friday 06 March 2015 23:23:06 Aaro Koskinen wrote: > Hi, > > On Fri, Mar 06, 2015 at 10:36:32AM -0800, Tony Lindgren wrote: > > Are there any fixes in this series that should go into > > v4.0-rc series, or can it all wait for v4.1? > > I think these all should wait for v4.1. > > A. I would s

[PATCH v2] crypto: omap-sham: Check for return value from pm_runtime_get_sync

2015-03-08 Thread Pali Rohár
Function pm_runtime_get_sync could fail and we need to check return value to prevent kernel crash. Signed-off-by: Pali Rohár --- v2: Check return value for all pm_runtime_get_sync() calls --- drivers/crypto/omap-sham.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions

tcrypt.ko module usage

2015-03-08 Thread sri sowj
HI All, As I understand tcrypt.ko module purpose is to test different crypto algorithm from the kenrel space. Please can some one help me with below queries to understand tcrypt use cases. #1:If one need to test crypto algorithms with under laying crypto Hardware engine using tcrypto module ,is