Re: [PATCH] crypto: omap: Free memory in error path

2015-01-25 Thread Christophe JAILLET
Oups, should be: free_pages((unsigned long)buf_out, pages); free_pages((unsigned long)buf_in, pages); CJ Le 26/01/2015 06:40, Christophe Jaillet a écrit : If only one of the 2 __get_free_pages fails, then there is a memory leak Signed-off-by: Christophe Jaillet --- drivers/crypt

[PATCH] crypto: omap: Free memory in error path

2015-01-25 Thread Christophe Jaillet
If only one of the 2 __get_free_pages fails, then there is a memory leak Signed-off-by: Christophe Jaillet --- drivers/crypto/omap-aes.c | 2 ++ drivers/crypto/omap-des.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index f79dd41..c

Re: [PATCH v1 0/3] SHA256 for PPC/SPE

2015-01-25 Thread Markus Stockhausen
> Von: linux-crypto-ow...@vger.kernel.org > [linux-crypto-ow...@vger.kernel.org]" im Auftrag von "Herbert Xu > [herb...@gondor.apana.org.au] > Gesendet: Montag, 26. Januar 2015 01:18 > An: Markus Stockhausen > Cc: linux-crypto@vger.kernel.org; linuxppc-...@lists.ozlabs.org > Betreff: Re: [PATCH v

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Mon, Jan 26, 2015 at 05:39:27AM +0100, Stephan Mueller wrote: > > But does it really matter if we consider size == 0 or != at this point? In > case size == 0, the len calculation before the inner while loop will return > 0. Of course it matters because you may die due to the aead_writable che

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 15:37:33 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 26, 2015 at 05:35:07AM +0100, Stephan Mueller wrote: > > It seems I have misunderstood you in the last discussion. > > I thought you were limiting the receive SGL by ALG_MAX_PAGES rather > than a single IOV entry.

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 15:32:18 schrieb Herbert Xu: Hi Herbert, > On Mon, Jan 26, 2015 at 05:26:33AM +0100, Stephan Mueller wrote: > > Am Montag, 26. Januar 2015, 10:55:50 schrieb Herbert Xu: > > > > Hi Herbert, > > > > > On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > >

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Mon, Jan 26, 2015 at 05:35:07AM +0100, Stephan Mueller wrote: > > It seems I have misunderstood you in the last discussion. I thought you were limiting the receive SGL by ALG_MAX_PAGES rather than a single IOV entry. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herber

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 11:06:31 schrieb Herbert Xu: Hi Herbert, > On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + /* > > +* Require exactly one IOV block as the AEAD operation is a one shot > > +* due to the authentication tag. > > +*/ > > + if (msg->ms

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Mon, Jan 26, 2015 at 05:26:33AM +0100, Stephan Mueller wrote: > Am Montag, 26. Januar 2015, 10:55:50 schrieb Herbert Xu: > > Hi Herbert, > > > On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > > + /* use the existing memory in an allocated page */ > > > + if

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Stephan Mueller
Am Montag, 26. Januar 2015, 10:55:50 schrieb Herbert Xu: Hi Herbert, > On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + /* use the existing memory in an allocated page */ > > + if (ctx->merge) { > > + sg = sgl->sg + sgl->cur - 1; > > +

Re: [PATCH] crypto: algif - change algif_skcipher to be asynchronous

2015-01-25 Thread Herbert Xu
On Fri, Jan 23, 2015 at 02:40:56PM -0800, Tadeusz Struk wrote: > > Ok, It looks to me that we *do* have all we need to implement zero copy > and AIO with algif_skcipher. The only thing we need to do is to add > support for it in skcipher_recvmsg(). I think no change is required in > neither skciphe

Re: [PATCH 1/2] crypto: caam: pair irq map and dispose in the same function

2015-01-25 Thread Herbert Xu
On Thu, Jan 22, 2015 at 04:00:48PM +0200, Cristian Stoica wrote: > irq_dispose_mapping is not called on all error paths from caam_jr_init. > This takes care of several clean-up issues by performing resource > clean-up and allocation at the same level. > > Signed-off-by: Cristian Stoica Both patc

Re: [PATCH] crypto: caam - don't emit ICV check failures to dmesg

2015-01-25 Thread Herbert Xu
On Wed, Jan 21, 2015 at 10:57:32AM +0200, Cristian Stoica wrote: > Hi Kim, > > On 01/20/2015 08:43 PM, Kim Phillips wrote: > > ICV check failures are part of normal operation; > > leave user notification up to the higher levels, > > as is done in s/w algorithm implementations. > > > > Tested on

Re: [PATCH] crypto: ccp: terminate ccp_support array with empty element

2015-01-25 Thread Herbert Xu
On Fri, Jan 23, 2015 at 09:11:45AM -0600, Tom Lendacky wrote: > On 01/21/2015 09:06 AM, Andrey Ryabinin wrote: > >x86_match_cpu() expects array of x86_cpu_ids terminated > >with empty element. > > > >Signed-off-by: Andrey Ryabinin > > Acked-by: Tom Lendacky Applied. -- Email: Herbert Xu Home

Re: [PATCH repost] virtio_rng: drop extra empty line

2015-01-25 Thread Herbert Xu
On Tue, Jan 20, 2015 at 02:35:15PM +0200, Michael S. Tsirkin wrote: > makes code look a bit prettier. > > Cc: linux-crypto@vger.kernel.org. > Signed-off-by: Michael S. Tsirkin Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~her

Re: [PATCH 1/2] crypto: caam: remove dead code

2015-01-25 Thread Herbert Xu
On Wed, Jan 21, 2015 at 11:53:30AM +0200, Cristian Stoica wrote: > - assoc_nents and src_nents are never zero when all_contig is false > - iv_contig is zero on the else branch > > Signed-off-by: Cristian Stoica > Reviewed-by: Richard Schmitt Both patches applied. -- Email: Herbert Xu Home Pag

Re: [PATCH] crypto: replace scatterwalk_sg_next with sg_next

2015-01-25 Thread Herbert Xu
On Tue, Jan 20, 2015 at 10:06:16AM +0200, Cristian Stoica wrote: > Modify crypto drivers to use the generic SG helper since > both of them are equivalent and the one from crypto is redundant. > > See also: > 468577abe37ff7b453a9ac613e0ea155349203ae reverted in > b2ab4a57b018aafbba35bff088218

Re: [PATCH] crypto: atmel: Free memory in error path

2015-01-25 Thread Herbert Xu
On Tue, Jan 20, 2015 at 08:15:52AM +0100, Christophe Jaillet wrote: > If only one of the 2 __get_free_pages fails, then there is a memory leak. > > Signed-off-by: Christophe Jaillet Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.a

Re: [PATCH v1 0/3] SHA256 for PPC/SPE

2015-01-25 Thread Herbert Xu
Markus Stockhausen wrote: > > [PATCH v1 0/3] SHA256 for PPC/SPE > > The following patches add support for SIMD accelerated SHA256 > calculation on PPC processors with SPE instruction set. The > implementation takes care of the following constraints: > > - independant of processor endianess >

Re: [PATCH] crypto: aesni - make driver-gcm-aes-aesni helper a proper aead alg

2015-01-25 Thread Herbert Xu
On Sun, Jan 25, 2015 at 08:26:50AM -0800, Tadeusz Struk wrote: > Hi Stephan, > On 01/25/2015 12:58 AM, Stephan Mueller wrote: > >> +static int rfc4106_set_key(struct crypto_aead *parent, const u8 *key, > >> > + unsigned int key_len) > >> > { > >> > struct aesni_r

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + /* > + * Require exactly one IOV block as the AEAD operation is a one shot > + * due to the authentication tag. > + */ > + if (msg->msg_iter.nr_segs != 1) > + return -ENOMSG; Why does limit ex

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + if (!aead_writable(sk)) { > + /* user space sent too much data */ > + aead_put_sgl(sk); > + err = -EMSGSIZE; > + goto unlock; > +

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > + /* use the existing memory in an allocated page */ > + if (ctx->merge) { > + sg = sgl->sg + sgl->cur - 1; > + len = min_t(unsigned long, len, > +

Re: [PATCH v11 1/2] crypto: AF_ALG: add AEAD support

2015-01-25 Thread Herbert Xu
On Wed, Jan 21, 2015 at 02:19:17AM +0100, Stephan Mueller wrote: > > +static void aead_data_wakeup(struct sock *sk) > +{ > + struct alg_sock *ask = alg_sk(sk); > + struct aead_ctx *ctx = ask->private; > + struct socket_wq *wq; > + > + if (ctx->more) > + return; You shou

Re: [PATCH] crypto: aesni - make driver-gcm-aes-aesni helper a proper aead alg

2015-01-25 Thread Tadeusz Struk
Hi Stephan, On 01/25/2015 12:58 AM, Stephan Mueller wrote: >> +static int rfc4106_set_key(struct crypto_aead *parent, const u8 *key, >> > + unsigned int key_len) >> > { >> >struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(parent); >> >struct crypto_aead *cr

Re: [PATCH] crypto: aesni - make driver-gcm-aes-aesni helper a proper aead alg

2015-01-25 Thread Stephan Mueller
Am Freitag, 23. Januar 2015, 14:33:57 schrieb Tadeusz Struk: Hi Tadeusz, > Changed the __driver-gcm-aes-aesni to be a proper aead algorithm. > > Signed-off-by: Tadeusz Struk > --- > arch/x86/crypto/aesni-intel_glue.c | 53 > ++-- 1 file changed, 39 insertions(+