Re: [PATCH 2/3] crypto: AF_ALG - disregard AAD buffer space for output

2016-11-11 Thread Herbert Xu
On Sat, Nov 12, 2016 at 03:03:36AM +0100, Stephan Mueller wrote: > > When you have separate buffers, the kernel does not seem to copy the AD over > to the target buffer. OK we should definitely fix that. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: htt

Re: [PATCH 2/3] crypto: AF_ALG - disregard AAD buffer space for output

2016-11-11 Thread Stephan Mueller
Am Samstag, 12. November 2016, 09:55:19 CET schrieb Herbert Xu: Hi Herbert, > On Thu, Nov 10, 2016 at 04:32:03AM +0100, Stephan Mueller wrote: > > The kernel crypto API AEAD cipher operation generates output such that > > space for the AAD is reserved in the output buffer without being > > touche

Re: [PATCH 2/3] crypto: AF_ALG - disregard AAD buffer space for output

2016-11-11 Thread Stephan Mueller
Am Freitag, 11. November 2016, 16:26:12 CET schrieb Mat Martineau: Hi Mat, > > > > With this solution, the caller must not use sendpage with the exact same > > buffers for input and output. The following rationale applies: When > > the caller sends the same buffer for input/output to the sendpage

Re: [PATCH 2/3] crypto: AF_ALG - disregard AAD buffer space for output

2016-11-11 Thread Herbert Xu
On Thu, Nov 10, 2016 at 04:32:03AM +0100, Stephan Mueller wrote: > The kernel crypto API AEAD cipher operation generates output such that > space for the AAD is reserved in the output buffer without being > touched. The processed ciphertext/plaintext is appended to the reserved > AAD buffer. > > T

Re: [PATCH 2/3] crypto: AF_ALG - disregard AAD buffer space for output

2016-11-11 Thread Mat Martineau
Stephan, On Thu, 10 Nov 2016, Stephan Mueller wrote: The kernel crypto API AEAD cipher operation generates output such that space for the AAD is reserved in the output buffer without being touched. The processed ciphertext/plaintext is appended to the reserved AAD buffer. The user space inter

Re: [PATCH] crypto: arm64/sha2: integrate OpenSSL implementations of SHA256/SHA512

2016-11-11 Thread Will Deacon
On Fri, Nov 11, 2016 at 09:51:13PM +0800, Ard Biesheuvel wrote: > This integrates both the accelerated scalar and the NEON implementations > of SHA-224/256 as well as SHA-384/512 from the OpenSSL project. > > Relative performance compared to the respective generic C versions: > >

Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized

2016-11-11 Thread Arnd Bergmann
On Friday, November 11, 2016 9:13:00 AM CET Linus Torvalds wrote: > On Thu, Nov 10, 2016 at 8:44 AM, Arnd Bergmann wrote: > > > > Please merge these directly if you are happy with the result. > > I will take this. Thanks a lot! > I do see two warnings, but they both seem to be valid and recent

Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized

2016-11-11 Thread Linus Torvalds
On Thu, Nov 10, 2016 at 8:44 AM, Arnd Bergmann wrote: > > Please merge these directly if you are happy with the result. I will take this. I do see two warnings, but they both seem to be valid and recent, though, so I have no issues with the spurious cases. Warning #1: sound/soc/qcom/lpass-pl

[PATCH -next] hwrng: atmel - use clk_disable_unprepare instead of clk_disable

2016-11-11 Thread Wei Yongjun
From: Wei Yongjun Since clk_prepare_enable() is used to get trng->clk, we should use clk_disable_unprepare() to release it for the error path. Signed-off-by: Wei Yongjun --- drivers/char/hw_random/atmel-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_r

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

2016-11-11 Thread Stephan Mueller
Am Dienstag, 13. September 2016, 13:27:34 CET schrieb Stephan Mueller: Hi Herbert, > 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, e

[PATCH] crypto: arm64/sha2: integrate OpenSSL implementations of SHA256/SHA512

2016-11-11 Thread Ard Biesheuvel
This integrates both the accelerated scalar and the NEON implementations of SHA-224/256 as well as SHA-384/512 from the OpenSSL project. Relative performance compared to the respective generic C versions: | SHA256-scalar | SHA256-NEON* | SHA512 | +---

Re: algif_aead: AIO broken with more than one iocb

2016-11-11 Thread Stephan Mueller
Am Dienstag, 13. September 2016, 18:12:46 CET schrieb Herbert Xu: Hi Herbert, > On Sun, Sep 11, 2016 at 04:59:19AM +0200, Stephan Mueller wrote: > > Hi Herbert, > > > > The AIO support for algif_aead is broken when submitting more than one > > iocb.> > > The break happens in aead_recvmsg_async

[PATCH] crypto: nx - drop duplicate header types.h

2016-11-11 Thread Geliang Tang
Drop duplicate header types.h from nx.c. Signed-off-by: Geliang Tang --- drivers/crypto/nx/nx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c index 42f0f22..036057a 100644 --- a/drivers/crypto/nx/nx.c +++ b/drivers/crypto/nx/nx.c @@ -32,7 +32,

[PATCH] crypto: jitterentropy - drop duplicate header module.h

2016-11-11 Thread Geliang Tang
Drop duplicate header module.h from jitterentropy-kcapi.c. Signed-off-by: Geliang Tang --- crypto/jitterentropy-kcapi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c index c4938497..787dccc 100644 --- a/crypto/jitterentropy-kcapi.c

Re: [PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-11 Thread Herbert Xu
On Wed, Nov 02, 2016 at 01:54:20PM -0700, Eric Biggers wrote: > > I think the case where skcipher_copy_iv() fails may be handled incorrectly. > Wouldn't it need to set walk.nbytes to 0 so as to not confuse callers which > expect that behavior? Or maybe it should be calling skcipher_walk_done(). G