Re: [PATCHv2] tls: Add support for encryption using async offload accelerator

2018-01-31 Thread Gilad Ben-Yossef
t (and it seems davem agrees with me). Vakul's patch looks good to me for now. > >> > If the flag MSG_DONTWAIT is set, we should be returning -EINPROGRESS and >> > not wait for a response. I had started working on a patch for that, but >> > it's >> > pretty tricky to

Re: [PATCH] tls: Add support for encryption using async offload accelerator

2018-01-30 Thread Gilad Ben-Yossef
On Wed, Jan 31, 2018 at 8:10 AM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: > Hi Vakul, > > On Wed, Jan 31, 2018 at 12:36 PM, Vakul Garg <vakul.g...@nxp.com> wrote: >> Async crypto accelerators (e.g. drivers/crypto/caam) support offloading >> G

Re: [PATCH] tls: Add support for encryption using async offload accelerator

2018-01-30 Thread Gilad Ben-Yossef
init_completion(_done.comp); > + > rc = crypto_aead_encrypt(aead_req); > + if (rc == -EINPROGRESS) { > + wait_for_completion(_done.comp); > + rc = crypto_done.result; > + } > > ctx->sg_encrypted_data[0].offset -= t

[PATCH v10 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-10-18 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-elec

[PATCH v10 00/20] simplify crypto wait for async op

2017-10-18 Thread Gilad Ben-Yossef
the change moving over the algif code which it originated from to the new API. - Inline crypto_wait_req(). - Some code indentation fixes. Gilad Ben-Yossef (20): crypto: change transient busy return code to -ENOSPC crypto: ccp: use -ENOSPC for transient busy indication net: use -ENOSPC for tran

[PATCH v10 09/20] crypto: move drbg to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/drbg.c | 36 +--- include/crypto/drbg.h | 3 +-- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c

[PATCH v10 11/20] crypto: move testmgr to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/testmgr.c

[PATCH v10 04/20] crypto: remove redundant backlog checks on EBUSY

2017-10-18 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/ahash.c| 12 +++- crypto/cts.c

[PATCH v10 13/20] dm: move dm-verity to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
prior to the async op finishing, should this code ever move to a context where signals are not masked. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Mikulas Patocka <mpato...@redhat.com> --- drivers/md/dm-verity-target.c | 81 +++ d

[PATCH v10 14/20] cifs: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Pavel Shilovsky <pshi...@microsoft.com> --- fs/cifs/smb2ops.c | 30 -- 1 fil

[PATCH v10 17/20] crypto: talitos: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Tested-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/ta

[PATCH v10 20/20] crypto: adapt api sample to use async. op wait

2017-10-18 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/cryp

[PATCH v10 18/20] crypto: qce: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 del

[PATCH v10 19/20] crypto: mediatek: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Ryder Lee <ryder@mediatek.com> --- drivers/crypto/mediatek/mt

[PATCH v10 16/20] crypto: tcrypt: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(

[PATCH v10 15/20] ima: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- security/integrity/ima/ima_c

[PATCH v10 12/20] fscrypt: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- fs/crypto/crypto.c | 28 fs/crypto/fname.c

[PATCH v10 10/20] crypto: move gcm to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto

[PATCH v10 07/20] crypto: move algif to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_

[PATCH v10 08/20] crypto: move pub key to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 inse

[PATCH v10 06/20] crypto: introduce crypto wait for async op

2017-10-18 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> CC: Jonathan Cameron <jonathan.came...@huawei.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2

[PATCH v10 02/20] crypto: ccp: use -ENOSPC for transient busy indication

2017-10-18 Thread Gilad Ben-Yossef
Replace -EBUSY with -ENOSPC when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Reviewed-by: Gary R Hook <gary.h...@amd.com> --- Please squash this patch with the previous one when merging upstream. drivers/cr

[PATCH v10 03/20] net: use -ENOSPC for transient busy indication

2017-10-18 Thread Gilad Ben-Yossef
Replace -EBUSY with -ENOSPC when handling transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Please squash this patch with the previous one when merging upstream. net/ipv4/ah4.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv6/ah6.

[PATCH v10 01/20] crypto: change transient busy return code to -ENOSPC

2017-10-18 Thread Gilad Ben-Yossef
st_flags(req) & CRYPTO_TFM_REQ_MAY_BACKLOG))) This patch changes the return code used to indicate a crypto op failed due to the transformation provider being transiently busy to -ENOSPC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- c

Re: [PATCH v9 00/20] simplify crypto wait for async op

2017-10-17 Thread Gilad Ben-Yossef
On Tue, Oct 17, 2017 at 5:06 PM, Russell King - ARM Linux <li...@armlinux.org.uk> wrote: > On Sun, Oct 15, 2017 at 10:19:45AM +0100, Gilad Ben-Yossef wrote: >> Many users of kernel async. crypto services have a pattern of >> starting an async. crypto op and than using a

Re: [PATCH v9 00/20] simplify crypto wait for async op

2017-10-17 Thread Gilad Ben-Yossef
On Sun, Oct 15, 2017 at 6:38 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > > On Sun, Oct 15, 2017 at 10:19:45AM +0100, Gilad Ben-Yossef wrote: > > > > Changes from v8: > > - Remove the translation of EAGAIN return code to the > > previous ret

[PATCH v9 02/20] crypto: ccp: use -EAGAIN for transient busy indication

2017-10-15 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Reviewed-by: Gary R Hook <gary.h...@amd.com> --- Please squash this patch with the previous one when merging upstream. drivers/cr

[PATCH v9 00/20] simplify crypto wait for async op

2017-10-15 Thread Gilad Ben-Yossef
sting code and rebase on top of that patch set. - Rename 'ecr' to 'wait' in fscrypto code. - Split patch introducing the new API from the change moving over the algif code which it originated from to the new API. - Inline crypto_wait_req(). - Some code indentation fixes. Gilad Ben-Yossef (20)

[PATCH v9 03/20] net: use -EAGAIN for transient busy indication

2017-10-15 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when handling transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Please squash this patch with the previous one when merging upstream. net/ipv4/ah4.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv6/ah6.

[PATCH v9 09/20] crypto: move drbg to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/drbg.c | 36 +--- include/crypto/drbg.h | 3 +-- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c

[PATCH v9 06/20] crypto: introduce crypto wait for async op

2017-10-15 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> CC: Jonathan Cameron <jonathan.came...@huawei.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2

[PATCH v9 07/20] crypto: move algif to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_

[PATCH v9 15/20] ima: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- security/integrity/ima/ima_c

[PATCH v9 11/20] crypto: move testmgr to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/testmgr.c

[PATCH v9 13/20] dm: move dm-verity to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
prior to the async op finishing, should this code ever move to a context where signals are not masked. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Mikulas Patocka <mpato...@redhat.com> --- drivers/md/dm-verity-target.c | 81 +++ d

[PATCH v9 14/20] cifs: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Pavel Shilovsky <pshi...@microsoft.com> --- fs/cifs/smb2ops.c | 30 -- 1 fil

[PATCH v9 12/20] fscrypt: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- fs/crypto/crypto.c | 28 fs/crypto/fname.c

[PATCH v9 20/20] crypto: adapt api sample to use async. op wait

2017-10-15 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/cryp

[PATCH v9 19/20] crypto: mediatek: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Ryder Lee <ryder@mediatek.com> --- drivers/crypto/mediatek/mt

[PATCH v9 17/20] crypto: talitos: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(

[PATCH v9 18/20] crypto: qce: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 del

[PATCH v9 16/20] crypto: tcrypt: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(

[PATCH v9 10/20] crypto: move gcm to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto

[PATCH v9 08/20] crypto: move pub key to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 inse

[PATCH v9 04/20] crypto: remove redundant backlog checks on EBUSY

2017-10-15 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/ahash.c| 12 +++- crypto/cts.c

[PATCH v9 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-10-15 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-elec

[PATCH v9 01/20] crypto: change transient busy return code to -EAGAIN

2017-10-15 Thread Gilad Ben-Yossef
st_flags(req) & CRYPTO_TFM_REQ_MAY_BACKLOG))) This patch changes the return code used to indicate a crypto op failed due to the transformation provider being transiently busy to -EAGAIN. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- c

Re: [PATCH v8 01/20] crypto: change transient busy return code to -EAGAIN

2017-10-07 Thread Gilad Ben-Yossef
On Sat, Oct 7, 2017 at 6:05 AM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Tue, Sep 05, 2017 at 03:38:40PM +0300, Gilad Ben-Yossef wrote: >> >> diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c >> index 5e92bd2..3b3c154 100644 >> --- a/cr

[PATCH v8 01/20] crypto: change transient busy return code to -EAGAIN

2017-09-05 Thread Gilad Ben-Yossef
st_flags(req) & CRYPTO_TFM_REQ_MAY_BACKLOG))) This patch changes the return code used to indicate a crypto op failed due to the transformation provider being transiently busy to -EAGAIN. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto

[PATCH v8 04/20] crypto: remove redundant backlog checks on EBUSY

2017-09-05 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/ahash.c| 12 +++- crypto/cts.c

[PATCH v8 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-09-05 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-elec

[PATCH v8 06/20] crypto: introduce crypto wait for async op

2017-09-05 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> CC: Jonathan Cameron <jonathan.came...@huawei.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2

[PATCH v8 10/20] crypto: move gcm to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto

[PATCH v8 14/20] cifs: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Pavel Shilovsky <pshi...@microsoft.com> --- fs/cifs/smb2ops.c | 30 -- 1 fil

[PATCH v8 11/20] crypto: move testmgr to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/testmgr.c

[PATCH v8 13/20] dm: move dm-verity to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
prior to the async op finishing, should this code ever move to a context where signals are not masked. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Mikulas Patocka <mpato...@redhat.com> --- drivers/md/dm-verity-target.c | 81 +++ d

[PATCH v8 15/20] ima: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- security/integrity/ima/ima_c

[PATCH v8 16/20] crypto: tcrypt: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(

[PATCH v8 18/20] crypto: qce: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 del

[PATCH v8 20/20] crypto: adapt api sample to use async. op wait

2017-09-05 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/cryp

[PATCH v8 19/20] crypto: mediatek: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Ryder Lee <ryder@mediatek.com> --- drivers/crypto/mediatek/mt

[PATCH v8 17/20] crypto: talitos: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(

[PATCH v8 12/20] fscrypt: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- fs/crypto/crypto.c | 28 fs/crypto/fname.c

[PATCH v8 09/20] crypto: move drbg to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/drbg.c | 36 +--- include/crypto/drbg.h | 3 +-- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c

[PATCH v8 08/20] crypto: move pub key to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 inse

[PATCH v8 07/20] crypto: move algif to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_

[PATCH v8 03/20] net: use -EAGAIN for transient busy indication

2017-09-05 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when handling transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Please squash this patch with the previous one when merging upstream. --- net/ipv4/ah4.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv6/ah6.

[PATCH v8 02/20] crypto: ccp: use -EAGAIN for transient busy indication

2017-09-05 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Reviewed-by: Gary R Hook <gary.h...@amd.com> --- Please squash this patch with the previous one when merging upstream. --- driver

[PATCH v8 00/20] simplify crypto wait for async op

2017-09-05 Thread Gilad Ben-Yossef
he new API. - Inline crypto_wait_req(). - Some code indentation fixes. Gilad Ben-Yossef (20): crypto: change transient busy return code to -EAGAIN crypto: ccp: use -EAGAIN for transient busy indication net: use -EAGAIN for transient busy indication crypto: remove redundant backlog check

[PATCH ipsec-next v3 0/2] IPsec: do not ignore crypto err in ah input

2017-01-16 Thread Gilad Ben-Yossef
in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Alexander Alemayhu <alexan...@alemayhu.com> --- The change was boot tested on

[PATCH ipsec-next v3 1/2] IPsec: do not ignore crypto err in ah4 input

2017-01-16 Thread Gilad Ben-Yossef
in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- net/ipv4/ah4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/ah4.c

[PATCH ipsec-next v3 2/2] IPsec: do not ignore crypto err in ah6 input

2017-01-16 Thread Gilad Ben-Yossef
in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- net/ipv6/ah6.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv6/ah6.c

[PATCH v2 net-next] IPsec: do not ignore crypto err in ah input

2017-01-14 Thread Gilad Ben-Yossef
in a memcmp of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Alexander Alemayhu <alexan...@alemayhu.com> --- The change was boot tes

Re: [PATCH net-next] IPsec: do not ignore crypto err in ah input

2017-01-14 Thread Gilad Ben-Yossef
On Fri, Jan 13, 2017 at 9:45 AM, Alexander Alemayhu <alexan...@alemayhu.com> wrote: > On Thu, Jan 12, 2017 at 03:33:22PM +0200, Gilad Ben-Yossef wrote: >> ah input processing uses the asynchrnous hash crypto API which >> supplies an error code as part of the operation comple

[PATCH net-next] IPsec: do not ignore crypto err in ah input

2017-01-12 Thread Gilad Ben-Yossef
in a memcpy of the digest failing anyway and thus the security risk seems minor, performing a memory compare on what might be uninitialized memory is wrong. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- The change was boot tested on Arm64 but I did not exercise the specific error cod

Re: [PATCH net] dsa: fix promiscuity leak on slave dev open error

2015-06-28 Thread Gilad Ben-Yossef
On Fri, Jun 26, 2015 at 6:04 PM, Andrew Lunn and...@lunn.ch wrote: On Thu, Jun 25, 2015 at 04:50:13PM +0300, gil...@ezchip.com wrote: From: Gilad Ben-Yossef gi...@benyossef.com DSA master netdev promiscuity counter was not being properly decremented on slave device open error path

[PATCH net] dsa: fix promiscuity leak on slave dev open error

2015-06-25 Thread Gilad Ben-Yossef
DSA master netdev promiscuity counter was not being properly decremented on slave device open error path. Signed-off-by: Gilad Ben-Yossef gi...@benyossef.com CC: Gilad Ben-Yossef gil...@ezchip.com CC: David S. Miller da...@davemloft.net CC: Florian Fainelli f.faine...@gmail.com CC: Guenter Roeck

[PATCH] rocker: call correct unregister function on error

2015-06-23 Thread Gilad Ben-Yossef
Use the correct unregister function matching the register function on the error path. Signed-off-by: Gilad Ben-Yossef gi...@benyossef.com CC: Gilad Ben-Yossef gil...@ezchip.com CC: Scott Feldman sfel...@gmail.com CC: Jiri Pirko j...@resnulli.us --- drivers/net/ethernet/rocker/rocker.c |2