Re: [PATCH] crypto: squash lines for simple wrapper functions

2016-09-13 Thread Joe Perches
On Wed, 2016-09-14 at 11:10 +0900, Masahiro Yamada wrote: > 2016-09-13 4:44 GMT+09:00 Joe Perches : > > On Tue, 2016-09-13 at 04:27 +0900, Masahiro Yamada wrote: > > > Remove unneeded variables and assignments. > > Was this found by visual inspection or some tool? > > If it's via

Re: [PATCH] hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Sep 06, 2016 at 01:58:39PM +0530, PrasannaKumar Muralidharan wrote: >> Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. >> >> Signed-off-by: PrasannaKumar Muralidharan > > Patch applied.

Re: [PATCH v2 3/8] hwrng: omap - Switch to non-obsolete read API implementation

2016-09-13 Thread Herbert Xu
On Wed, Sep 07, 2016 at 05:57:38PM +0200, Romain Perier wrote: > + > +static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max, > + bool wait) > { > struct omap_rng_dev *priv; > - int data, i; > > priv = (struct omap_rng_dev *)rng->priv; >

Re: [PATCHv3 06/11] crypto: omap-des: Fix support for unequal lengths

2016-09-13 Thread Herbert Xu
On Thu, Aug 04, 2016 at 01:28:41PM +0300, Tero Kristo wrote: > From: Lokesh Vutla > > For cases where total length of an input SGs is not same as > length of the input data for encryption, omap-des driver > crashes. This happens in the case when IPsec is trying to use > omap-des

[PATCH 2/2] crypto: arm64/aes-ctr: fix NULL dereference in tail processing

2016-09-13 Thread Ard Biesheuvel
The AES-CTR glue code avoids calling into the blkcipher API for the tail portion of the walk, by comparing the remainder of walk.nbytes modulo AES_BLOCK_SIZE with the residual nbytes, and jumping straight into the tail processing block if they are equal. This tail processing block checks whether

Re: [PATCH v3] crypto: only call put_page on referenced and used pages

2016-09-13 Thread Stephan Mueller
Am Dienstag, 13. September 2016, 18:08:16 CEST schrieb Herbert Xu: Hi Herbert, > This patch appears to be papering over a real bug. > > The async path should be exactly the same as the sync path, except > that we don't wait for completion. So the question is why are we > getting this crash

Re: [PATCH] hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Herbert Xu
On Tue, Sep 06, 2016 at 01:58:39PM +0530, PrasannaKumar Muralidharan wrote: > Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. > > Signed-off-by: PrasannaKumar Muralidharan Patch applied. Thanks. -- Email: Herbert Xu

Re: algif_aead: AIO broken with more than one iocb

2016-09-13 Thread Stephan Mueller
Am Dienstag, 13. September 2016, 18:12:46 CEST schrieb Herbert Xu: Hi Herbert, > I don't think we should allow that. We should make it so that you > must start a recvmsg before you can send data for a new request. > > Remember that the async path should be identical to the sync path, > except

Re: [PATCH v2] hwrng: core - Allocate memory during module init

2016-09-13 Thread Herbert Xu
On Wed, Sep 07, 2016 at 08:18:02PM +0530, PrasannaKumar Muralidharan wrote: > In core rng_buffer and rng_fillbuf is allocated in hwrng_register only > once and it is freed during module exit. This patch moves allocating > rng_buffer and rng_fillbuf from hwrng_register to rng core's init. This >

Re: [PATCH v2 2/2] crypto: qat - fix resource release omissions

2016-09-13 Thread Herbert Xu
On Tue, Sep 06, 2016 at 11:18:51AM +0100, Giovanni Cabiddu wrote: > > ---8<--- > Subject: [PATCH] crypto: qat - fix leak on error path > > Fix a memory leak in an error path in uc loader. > > Signed-off-by: Giovanni Cabiddu Patch applied. Thanks. -- Email:

Re: hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Michael Ellerman
On Tue, 2016-06-09 at 08:28:39 UTC, PrasannaKumar Muralidharan wrote: > Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. > > Signed-off-by: PrasannaKumar Muralidharan Applied to powerpc next, thanks.

Re: [PATCHv3 00/11] crypto: omap HW crypto fixes

2016-09-13 Thread Herbert Xu
On Thu, Aug 04, 2016 at 01:28:35PM +0300, Tero Kristo wrote: > Hi, > > This revision took quite a bit time to craft due to the rework needed > for sham buffer handling and export/import. I ended up implementing > a flush functionality for draining out the sham buffer when doing > export/import;

Re: [PATCH] hwrng: geode-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Herbert Xu
On Sun, Sep 11, 2016 at 08:54:26PM +0530, PrasannaKumar Muralidharan wrote: > Fix checkpatch.pl warning by changing from asm/io.h to linux/io.h. In > the mean time arrange the includes in alphabetical order. > > Signed-off-by: PrasannaKumar Muralidharan Patch

Re: Kernel panic - encryption/decryption failed when open file on Arm64

2016-09-13 Thread Herbert Xu
On Mon, Sep 12, 2016 at 06:40:15PM +0100, Ard Biesheuvel wrote: > > So to me, it seems like we should be taking the blkcipher_next_slow() > path, which does a kmalloc() and bails with -ENOMEM if that fails. Indeed. This was broken a long time ago. It does seem to be fixed in the new

Re: [RFC PATCH v1 01/28] kvm: svm: Add support for additional SVM NPF error codes

2016-09-13 Thread Borislav Petkov
On Mon, Aug 22, 2016 at 07:23:44PM -0400, Brijesh Singh wrote: > From: Tom Lendacky > > AMD hardware adds two additional bits to aid in nested page fault handling. > > Bit 32 - NPF occurred while translating the guest's final physical address > Bit 33 - NPF occurred

Re: [PATCH] crypto: squash lines for simple wrapper functions

2016-09-13 Thread Herbert Xu
On Tue, Sep 13, 2016 at 04:27:54AM +0900, Masahiro Yamada wrote: > Remove unneeded variables and assignments. > > Signed-off-by: Masahiro Yamada Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH 1/2] crypto: arm/aes-ctr: fix NULL dereference in tail processing

2016-09-13 Thread Herbert Xu
On Tue, Sep 13, 2016 at 09:48:52AM +0100, Ard Biesheuvel wrote: > The AES-CTR glue code avoids calling into the blkcipher API for the > tail portion of the walk, by comparing the remainder of walk.nbytes > modulo AES_BLOCK_SIZE with the residual nbytes, and jumping straight > into the tail

[PATCH v7 7/9] crypto: acomp - add support for 842 via scomp

2016-09-13 Thread Giovanni Cabiddu
Add scomp backend for 842 compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/842.c | 135 +++- crypto/Kconfig |1 + 2 files changed, 134 insertions(+), 2 deletions(-) diff --git a/crypto/842.c

[PATCH v7 5/9] crypto: acomp - add support for lz4 via scomp

2016-09-13 Thread Giovanni Cabiddu
Add scomp backend for lz4 compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig |1 + crypto/lz4.c | 147 2 files changed, 138 insertions(+), 10 deletions(-) diff --git

[PATCH v7 4/9] crypto: acomp - add support for lzo via scomp

2016-09-13 Thread Giovanni Cabiddu
Add scomp backend for lzo compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig |1 + crypto/lzo.c | 146 +++- 2 files changed, 134 insertions(+), 13 deletions(-) diff --git

[PATCH v7 1/9] crypto: add asynchronous compression api

2016-09-13 Thread Giovanni Cabiddu
Add acomp, an asynchronous compression api that uses scatterlist buffers Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 10 ++ crypto/Makefile |2 + crypto/acompress.c | 118

[PATCH v7 9/9] crypto: acomp - update testmgr with support for acomp

2016-09-13 Thread Giovanni Cabiddu
Add tests to the test manager for algorithms exposed through the acomp api Signed-off-by: Giovanni Cabiddu --- crypto/testmgr.c | 158 +- 1 files changed, 145 insertions(+), 13 deletions(-) diff --git

[PATCH v7 6/9] crypto: acomp - add support for lz4hc via scomp

2016-09-13 Thread Giovanni Cabiddu
Add scomp backend for lz4hc compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig |1 + crypto/lz4hc.c | 147 2 files changed, 138 insertions(+), 10 deletions(-) diff --git

[PATCH v7 3/9] crypto: scomp - add scratch buffers allocator and deallocator

2016-09-13 Thread Giovanni Cabiddu
Add utility functions to allocate and deallocate scratch buffers used by software implementations of scomp Signed-off-by: Giovanni Cabiddu --- crypto/scompress.c | 41 +++ include/crypto/internal/scompress.h |2 +

Re: [PATCH v2 2/2] crypto: qat - fix resource release omissions

2016-09-13 Thread Quentin Lambert
On 13/09/2016 14:40, Herbert Xu wrote: On Tue, Sep 06, 2016 at 11:18:51AM +0100, Giovanni Cabiddu wrote: ---8<--- Subject: [PATCH] crypto: qat - fix leak on error path Fix a memory leak in an error path in uc loader. Signed-off-by: Giovanni Cabiddu Patch

Re: Kernel panic - encryption/decryption failed when open file on Arm64

2016-09-13 Thread Ard Biesheuvel
On 13 September 2016 at 07:43, Herbert Xu wrote: > On Mon, Sep 12, 2016 at 06:40:15PM +0100, Ard Biesheuvel wrote: >> >> So to me, it seems like we should be taking the blkcipher_next_slow() >> path, which does a kmalloc() and bails with -ENOMEM if that fails. > >

[PATCH v3] crypto: only call put_page on referenced and used pages

2016-09-13 Thread Stephan Mueller
Am Montag, 12. September 2016, 14:43:45 CEST schrieb Stephan Mueller: Hi Herbert, > Hi Herbert, > > after getting the AIO code working on sendmsg, tried it with vmsplice/splice > and I get a memory corruption. Interestingly, the stack trace is partially > garbled too. Thus, tracking this one