[PATCH] crypto: salsa20-generic - use crypto_xor_cpy()

2019-03-14 Thread Eric Biggers
From: Eric Biggers In salsa20_docrypt(), use crypto_xor_cpy() instead of crypto_xor(). This avoids having to memcpy() the src buffer to the dst buffer. Signed-off-by: Eric Biggers --- crypto/salsa20_generic.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crypto/s

[PATCH] crypto: chacha-generic - use crypto_xor_cpy()

2019-03-14 Thread Eric Biggers
From: Eric Biggers In chacha_docrypt(), use crypto_xor_cpy() instead of crypto_xor(). This avoids having to memcpy() the src buffer to the dst buffer. Signed-off-by: Eric Biggers --- crypto/chacha_generic.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crypto/chac

[PATCH 3/3] crypto: caam/jr - Remove extra memory barrier during job ring enqueue

2019-03-14 Thread Vakul Garg
In caam_jr_enqueue(), a write barrier is needed to order stores to job ring slot before declaring addition of new job into input job ring. The register write is done using wr_reg32() which internally uses iowrite32() for write operation. The api iowrite32() issues a write barrier before issuing wri

[PATCH 2/3] crypto: caam/jr - Remove redundant vars from job ring private data

2019-03-14 Thread Vakul Garg
For each job ring, the variable 'ringsize' is initialised but never used. Similarly variables 'inp_ring_read_index' and 'head' always track the same value and instead of 'inp_ring_read_index', caam_jr_enqueue() can use 'head' itself. Both these variables have been removed. Signed-off-by: Vakul Gar

[PATCH 1/3] crypto: caam/jr - Remove spinlock for output job ring

2019-03-14 Thread Vakul Garg
For each job ring pair, the output ring is processed exactly by one cpu at a time under a tasklet context (one per ring). Therefore, there is no need to protect a job ring's access & its private data structure using a lock. Hence the lock can be removed. Signed-off-by: Vakul Garg --- drivers/cry

[PATCH 0/3] CAAM job ring driver cleanups

2019-03-14 Thread Vakul Garg
This patchset cleans up caam job ring driver. The patch series needs to be applied after merging below mentioned patch. https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg37068.html Vakul Garg (3): crypto: caam/jr - Remove spinlock for output job ring crypto: caam/jr - Remove redund

Re: [Bug] Rockchip crypto driver sometimes produces wrong ciphertext

2019-03-14 Thread Eric Biggers
Hi Zhang, On Mon, Jan 28, 2019 at 11:14:32AM +0800, Tao Huang wrote: > Hi Eric and Heiko: > > >> On Sat, 26 Jan 2019 at 22:05, Eric Biggers wrote: > >>> > >>> Hello, > >>> > >>> I don't know whether anyone is actually maintaining the Rockchip crypto > >>> driver > >>> in drivers/crypto/rockchip

Re: [PATCH 0/6] ltp: AF_ALG test helpers and a few regression tests

2019-03-14 Thread Eric Biggers
On Wed, Feb 20, 2019 at 09:30:20PM -0800, Eric Biggers wrote: > Hello, > > This series adds helper functions for testing AF_ALG (the userspace > interface to algorithms in the Linux kernel's crypto API) to the > Linux Test Project. It then adds a few sample regression tests. > > I've had these p