Re: [PATCH v2] crypto: AF_ALG - remove locking in async callback

2017-11-10 Thread Herbert Xu
On Tue, Nov 07, 2017 at 10:05:48AM +0100, Stephan Müller wrote: > > if (msg->msg_iocb && !is_sync_kiocb(msg->msg_iocb)) { > /* AIO operation */ > + sock_hold(sk); > areq->iocb = msg->msg_iocb; >

Re: [PATCH 0/2] hwrng: iproc-rng200: Add support for BCM7278

2017-11-10 Thread Herbert Xu
On Wed, Nov 01, 2017 at 04:20:04PM -0700, Florian Fainelli wrote: > Hi, > > This patch series adds support for the RNG200 block found on the BCM7278 SoC. > This requires us to update the compatible string (and associated binding > document) as well as the Kconfig option to make that driver

Re: [PATCH] crypto: algif_aead - skip SGL entries with NULL page

2017-11-10 Thread Stephan Müller
Am Freitag, 10. November 2017, 08:29:40 CET schrieb Stephan Müller: Hi, > The TX SGL may contain SGL entries that are assigned a NULL page. This > may happen if a multi-stage AIO operation is performed where the data > for each stage is pointed to by one SGL entry. Upon completion of that >

[PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-10 Thread Stephan Müller
The code paths protected by the socket-lock do not use or modify the socket in a non-atomic fashion. The actions pertaining the socket do not even need to be handled as an atomic operation. Thus, the socket-lock can be safely ignored. This fixes a bug regarding scheduling in atomic as the

Re: [PATCH 1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-10 Thread Horia Geantă
On 11/10/2017 9:43 AM, Herbert Xu wrote: > On Fri, Nov 10, 2017 at 06:37:22AM +, Horia Geantă wrote: >> On 11/10/2017 12:21 AM, Herbert Xu wrote: >>> On Thu, Nov 09, 2017 at 02:37:29PM +, Horia Geantă wrote: >> sg_init_table(sg, np + 1); sg_mark_end() marks sg[np].

Re: [PATCH 1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-10 Thread Herbert Xu
On Fri, Nov 10, 2017 at 09:17:33AM +, Horia Geantă wrote: > > > I must be missing something. In the case rem == 0, let's say > > the original value of np is npo. Then at the start of the loop, > > np = npo - 1, and at the last iteration, k = npo - 2, so we do > IIUC at the start of the loop

Re: [PATCH] lib/mpi: call cond_resched() from mpi_powm() loop

2017-11-10 Thread Herbert Xu
On Mon, Nov 06, 2017 at 10:19:51PM -0800, Eric Biggers wrote: > From: Eric Biggers > > On a non-preemptible kernel, if KEYCTL_DH_COMPUTE is called with the > largest permitted inputs (16384 bits), the kernel spends 10+ seconds > doing modular exponentiation in mpi_powm()

Re: [PATCH v2 0/5] crypto: dh - input validation fixes

2017-11-10 Thread Herbert Xu
On Sun, Nov 05, 2017 at 06:30:43PM -0800, Eric Biggers wrote: > This series fixes several corner cases in the Diffie-Hellman key > exchange implementations: > > 1. With the software DH implementation, using a large buffer for 'g' >caused a double free. > 2. With CONFIG_DEBUG_SG=y and the

Re: [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update

2017-11-10 Thread Herbert Xu
On Mon, Nov 06, 2017 at 11:41:52PM +0100, lionel.debi...@st.com wrote: > From: Lionel Debieve > > When data append reached the threshold for processing, > we must inform that processing is on going to wait before > managing the next request. > > Signed-off-by: Lionel

[PATCH 1/2] crypto: caam - save Era in driver's private data

2017-11-10 Thread Horia Geantă
Save Era in driver's private data for further usage, like deciding whether an erratum applies or a feature is available based on its value. Signed-off-by: Horia Geantă --- drivers/crypto/caam/ctrl.c | 4 +++- drivers/crypto/caam/intern.h | 1 + 2 files changed, 4

[PATCH 2/2] crypto: caam - add Derived Key Protocol (DKP) support

2017-11-10 Thread Horia Geantă
Offload split key generation in CAAM engine, using DKP. DKP is supported starting with Era 6. Note that the way assoclen is transmitted from the job descriptor to the shared descriptor changes - DPOVRD register is used instead of MATH3 (where available), since DKP protocol thrashes the MATH

Re: [PATCH RESEND 1/4] crypto: caam: add caam-dma node to SEC4.0 device tree binding

2017-11-10 Thread Kim Phillips
On Fri, 10 Nov 2017 08:02:01 + Radu Andrei Alexe wrote: > On 11/9/2017 6:34 PM, Kim Phillips wrote: > > On Thu, 9 Nov 2017 11:54:13 + > > Radu Andrei Alexe wrote: > >> The next patch version will create the platform device dynamically at > >> run

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-10 Thread Romain Izard
2017-11-10 13:20 GMT+01:00 Stephan Müller : > The code paths protected by the socket-lock do not use or modify the > socket in a non-atomic fashion. The actions pertaining the socket do not > even need to be handled as an atomic operation. Thus, the socket-lock > can be safely

Re: [PATCH RESEND 1/4] crypto: caam: add caam-dma node to SEC4.0 device tree binding

2017-11-10 Thread Radu Andrei Alexe
On 11/9/2017 6:34 PM, Kim Phillips wrote: > On Thu, 9 Nov 2017 11:54:13 + > Radu Andrei Alexe wrote: > >> On 10/30/2017 4:24 PM, Kim Phillips wrote: >>> On Mon, 30 Oct 2017 15:46:51 +0200 >>> Horia Geantă wrote: >>>

Re: [PATCH] crypto: s5p-sss - Remove a stray tab

2017-11-10 Thread Krzysztof Kozlowski
On Thu, Nov 9, 2017 at 10:26 PM, Dan Carpenter wrote: > This code seems correct, but the goto was indented too far. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c Reviewed-by: Krzysztof