[PATCH v2] crypto: qat - Don't attempt to register algorithm multiple times

2015-07-21 Thread Tadeusz Struk
When multiple devices are present in the system the driver attempts to register the same algorithm many times. Changes in v2: - use proper synchronization mechanizm between register and unregister Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_asym_algs.c | 19 +++

[PATCH] crypto: qat - Fix invalid synchronization between register/unregister sym algs

2015-07-21 Thread Tadeusz Struk
The synchronization method used atomic was bogus. Use a proper synchronization with mutex. Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_algs.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_a

Re: [PATCH 0/3] AF_ALG interface for akcipher

2015-07-21 Thread Herbert Xu
On Tue, Jul 21, 2015 at 09:19:28PM -0700, Tadeusz Struk wrote: > > Is there any other in-kernel user of RSA other than the module verifier? Not that I know of. > If that's the only one I don't think we need any API changes. > I can refresh the old patches that converted it. Thanks, -- Email: H

Re: [PATCH 0/3] AF_ALG interface for akcipher

2015-07-21 Thread Tadeusz Struk
On 07/21/2015 06:32 PM, Herbert Xu wrote: > I think we should finish the conversion of the only in-kernel > user of RSA before we add the user-space interface. Otherwise > this unnecessarily ties our hands to the current API. > > For example, do we want an SG interface for the input and output? >

Re: [PATCH 0/3] AF_ALG interface for akcipher

2015-07-21 Thread Herbert Xu
On Wed, Jul 22, 2015 at 12:12:29AM +0200, Stephan Mueller wrote: > > The patchset provides the implementation of the AF_ALG userspace interface > for the asymmetric cipher API of the kernel crypto API. I think we should finish the conversion of the only in-kernel user of RSA before we add the use

[PATCH 1/3] crypto: af_alg - add sig gen / verify API

2015-07-21 Thread Stephan Mueller
As a prerequisite to add the asymmetric cipher AF_ALG API, this patch adds the user space interface identifier to tell the kernel about performing a signature generation and verification operation in addition to the existing encryption / decryption operation. CC: Tadeusz Struk Signed-off-by: Step

[PATCH 0/3] AF_ALG interface for akcipher

2015-07-21 Thread Stephan Mueller
Hi, The patchset provides the implementation of the AF_ALG userspace interface for the asymmetric cipher API of the kernel crypto API. Unlike any other crypto API, the akcipher API operates on linear buffers. This implies that the AF_ALG interface also only operates with linear buffers by allocat

[PATCH 2/3] crypto: algif_akcipher user space interface

2015-07-21 Thread Stephan Mueller
This patch adds the AF_ALG interface to user space. The akcipher kernel crypto API uses linear buffers (instead of the scatter lists for the other AF_ALG interfaces). To handle such linear buffer, the interface handler uses an internal buffer to operate on data. The buffer has the size required by

[PATCH 3/3] crypto: algif_akcipher - enable compilation

2015-07-21 Thread Stephan Mueller
Add the Makefile and Kconfig updates to allow algif_akcipher to be compiled. CC: Tadeusz Struk Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 354bb69..d12ecc5 100644 -

Re: [PATCH v11] crypto: Add Allwinner Security System crypto accelerator

2015-07-21 Thread Herbert Xu
On Tue, Jul 21, 2015 at 02:38:47PM +0200, Maxime Ripard wrote: > I thought you needed at least my Acked-by for that, but > whatever... How are we supposed to handle subsequent DT patches that > should be merged through arm-soc then? What subsequent patches are you referring to? The changes in this

Re: [PATCH v11] crypto: Add Allwinner Security System crypto accelerator

2015-07-21 Thread Maxime Ripard
On Mon, Jul 20, 2015 at 04:20:57PM +0800, Herbert Xu wrote: > On Mon, Jul 20, 2015 at 10:18:36AM +0200, Maxime Ripard wrote: > > On Mon, Jul 20, 2015 at 04:10:50PM +0800, Herbert Xu wrote: > > > On Fri, Jul 17, 2015 at 04:39:37PM +0200, LABBE Corentin wrote: > > > > Hello > > > > > > > > This is t

Re: [PATCH] crypto: qat - fix invalid check for RSA keylen in fips mode

2015-07-21 Thread Herbert Xu
On Mon, Jul 20, 2015 at 05:18:27PM -0700, Tadeusz Struk wrote: > The condition checking allowed key length was invalid. > > Reported-by: Dan Carpenter > > Signed-off-by: Tadeusz Struk Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.o

Re: [PATCH] crypto: rsa - fix invalid check for keylen in fips mode

2015-07-21 Thread Herbert Xu
On Mon, Jul 20, 2015 at 05:18:26PM -0700, Tadeusz Struk wrote: > The condition checking allowed key length was invalid. > > Reported-by: Dan Carpenter > > Signed-off-by: Tadeusz Struk Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.o

Re: [PATCH] crypto: qat - Don't attempt to register algorithm multiple times

2015-07-21 Thread Herbert Xu
On Mon, Jul 20, 2015 at 06:45:38PM -0700, Tadeusz Struk wrote: > When multiple devices are present in the system the driver attempts > to register the same algorithm many times. > > Signed-off-by: Tadeusz Struk > --- > drivers/crypto/qat/qat_common/qat_asym_algs.c | 13 ++--- > 1 file