[RFC 06/10] dm: move dm-verity to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
dm-verity is starting 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> --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h

[RFC 04/10] crypto: move gcm to generic async completion

2017-05-06 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 | 34 ++ 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/

[RFC 01/10] crypto: factor async completion for general use

2017-05-06 Thread Gilad Ben-Yossef
of hand rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c | 30 +++--- crypto/algif_skcipher.c | 10 +-

[RFC 03/10] crypto: move drbg to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
the same I believe this is acceptable. In similar fashion the code now passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for the completion of the request any way. Signed-off-by: Gilad Ben

[RFC 02/10] crypto: move pub key to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
for -EBUSY return code thus leading to a possible use-after-free if the crypto backlog queue was ever used. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 insertions(+), 24 deletions(-) diff

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 v7 17/19] crypto: qce: move to generic async completion

2017-08-24 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 v7 02/19] crypto: ccp: use -EAGAIN for transient busy indication

2017-08-24 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> --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/crypto/ccp/ccp-dev.c

[PATCH v7 11/19] fscrypt: move to generic async completion

2017-08-24 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 v7 10/19] crypto: move testmgr to generic async completion

2017-08-24 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 v7 08/19] crypto: move drbg to generic async completion

2017-08-24 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 v7 13/19] cifs: move to generic async completion

2017-08-24 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 v7 03/19] crypto: remove redundant backlog checks on EBUSY

2017-08-24 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 v7 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-24 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 v7 01/19] crypto: change transient busy return code to -EAGAIN

2017-08-24 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 v7 06/19] crypto: move algif to generic async completion

2017-08-24 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 v7 05/19] crypto: introduce crypto wait for async op

2017-08-24 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 v7 07/19] crypto: move pub key to generic async completion

2017-08-24 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 v7 00/19] simplify crypto wait for async op

2017-08-24 Thread Gilad Ben-Yossef
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 (19): crypto: change transient busy return code

[PATCH v7 15/19] crypto: tcrypt: move to generic async completion

2017-08-24 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 v7 19/19] crypto: adapt api sample to use async. op wait

2017-08-24 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 v7 18/19] crypto: mediatek: move to generic async completion

2017-08-24 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 v7 14/19] ima: move to generic async completion

2017-08-24 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

Re: [PATCH v6 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-24 Thread Gilad Ben-Yossef
help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/crypto-change-transient-busy-return-code-to-EAGAIN/20170824-180606 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > config: arm-allmo

Re: [dm-devel] [PATCH v5 12/19] dm: move dm-verity to generic async completion

2017-08-21 Thread Gilad Ben-Yossef
On Sat, Aug 19, 2017 at 11:08 PM, Mikulas Patocka <mpato...@redhat.com> wrote: > > > > On Mon, 14 Aug 2017, Gilad Ben-Yossef wrote: > > > dm-verity is starting async. crypto ops and waiting for them to complete. > > Move it over to generic code doing the same. &

Re: [PATCH v5 05/19] crypto: introduce crypto wait for async op

2017-08-21 Thread Gilad Ben-Yossef
On Tue, Aug 15, 2017 at 5:23 AM, Jonathan Cameron <jonathan.came...@huawei.com> wrote: > On Mon, 14 Aug 2017 18:21:15 +0300 > Gilad Ben-Yossef <gi...@benyossef.com> wrote: > >> Invoking a possibly async. crypto op and waiting for completion >> while corr

[PATCH v6 00/19] simplify crypto wait for async op

2017-08-21 Thread Gilad Ben-Yossef
he 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 (19): crypto: change transient busy return code to -EAGAIN crypto: ccp: use -EAGAIN for transient busy indication cryp

[PATCH v6 19/19] crypto: adapt api sample to use async. op wait

2017-08-21 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 v6 18/19] crypto: mediatek: move to generic async completion

2017-08-21 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 v6 16/19] crypto: talitos: move to generic async completion

2017-08-21 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 v6 05/19] crypto: introduce crypto wait for async op

2017-08-21 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 v6 07/19] crypto: move pub key to generic async completion

2017-08-21 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 v6 10/19] crypto: move testmgr to generic async completion

2017-08-21 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 v6 11/19] fscrypt: move to generic async completion

2017-08-21 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 v6 08/19] crypto: move drbg to generic async completion

2017-08-21 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 v6 12/19] dm: move dm-verity to generic async completion

2017-08-21 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 v6 02/19] crypto: ccp: use -EAGAIN for transient busy indication

2017-08-21 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> --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/crypto/ccp/ccp-dev.c

[PATCH v6 03/19] crypto: remove redundant backlog checks on EBUSY

2017-08-21 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 v6 09/19] crypto: move gcm to generic async completion

2017-08-21 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 v6 17/19] crypto: qce: move to generic async completion

2017-08-21 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 v6 14/19] ima: move to generic async completion

2017-08-21 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 v6 15/19] crypto: tcrypt: move to generic async completion

2017-08-21 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 v6 13/19] cifs: move to generic async completion

2017-08-21 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 v6 06/19] crypto: move algif to generic async completion

2017-08-21 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 v6 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-21 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

Re: [PATCH v7 00/19] simplify crypto wait for async op

2017-09-03 Thread Gilad Ben-Yossef
ad > > > On Thu, Aug 24, 2017 at 7:48 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> Many users of kernel async. crypto services have a pattern of >> starting an async. crypto op and than using a completion >> to wait for it to end. >> >> Th

Re: [PATCH v7 00/19] simplify crypto wait for async op

2017-09-05 Thread Gilad Ben-Yossef
On Tue, Sep 5, 2017 at 2:23 PM, Harsh Jain <harshjain.p...@gmail.com> wrote: > On Sun, Sep 3, 2017 at 11:47 AM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain <harshjain.p...@gmail.com> wrote: >>> HI Gilad, >>&

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

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 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 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 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 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 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

[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 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 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 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 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 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 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 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 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

<    1   2   3   >