[PATCH] crypto: fix typo in doc

2017-02-13 Thread Gilad Ben-Yossef
Fix a single letter typo in api-skcipher.rst. Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-skcipher.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/crypto/api-skcipher.rst b/Documentation/crypto/api-skcipher.rst index b20028a..4eec4a9

[RFC 00/10] introduce crypto wait for async op function

2017-05-06 Thread Gilad Ben-Yossef
regarding some of the other users and would love feedback. Signed-off-by: Gilad Ben-Yossef Gilad Ben-Yossef (10): crypto: factor async completion for general use crypto: move pub key to generic async completion crypto: move drbg to generic async completion crypto: move gcm to gen

[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 --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c | 30 +++--- crypto/algif_skcipher.c | 10 +- crypto/api.c| 28

[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 --- crypto/gcm.c | 34 ++ 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c

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

2017-05-06 Thread Gilad Ben-Yossef
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
-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 --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/crypto/asymmetric_keys

[RFC 08/10] cifs: move to generic async completion

2017-05-06 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 --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs

[RFC 09/10] ima: move to generic async completion

2017-05-06 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 --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a

[RFC 10/10] crypto: adapt api sample to use async. op wait

2017-05-06 Thread Gilad Ben-Yossef
The code sample is waiting for an async. crypto op completion. Adapt sample to use the new generic infrastructure to do the same. Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10 insertions(+), 42 deletions

[RFC 05/10] crypto: move testmgr to generic async completion

2017-05-06 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 --- crypto/testmgr.c | 184

[RFC 07/10] fscrypt: move to generic async completion

2017-05-06 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 --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36 ++-- fs

[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 --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h| 5 --- 2 files changed, 20

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

2017-05-11 Thread Gilad Ben-Yossef
Hi Eric, On Thu, May 11, 2017 at 6:55 AM, Eric Biggers wrote: > Hi Gilad, > > On Sat, May 06, 2017 at 03:59:50PM +0300, Gilad Ben-Yossef wrote: >> Invoking a possibly async. crypto op and waiting for completion >> while correctly handling backlog processing is a common task

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

2017-05-11 Thread Gilad Ben-Yossef
On Thu, May 11, 2017 at 11:09 AM, Eric Biggers wrote: > On Thu, May 11, 2017 at 10:29:47AM +0300, Gilad Ben-Yossef wrote: >> > With regards to the wait being uninterruptible, I agree that this should >> > be the >> > default behavior, because I think use

[PATCH 4/4] crypto: Documentation: fix none signal safe sample

2017-05-11 Thread Gilad Ben-Yossef
. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst index d021fd9..944f08b 100644 --- a/Documentation/crypto

[PATCH 3/4] crypto: gcm wait for crypto op not signal safe

2017-05-11 Thread Gilad Ben-Yossef
etion() instead. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/drbg.c | 4 ++-- crypto/gcm.c | 6 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index fa9054d..cdb27ac 100644 --- a/crypto/drbg.c

[PATCH 1/4] crypto: handle EBUSY due to backlog correctly

2017-05-11 Thread Gilad Ben-Yossef
-after-free of buffers. Resolve this by handling -EBUSY correctly. Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/asymmetric_keys/public_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys

[PATCH 0/4] crypto: async crypto op fixes

2017-05-11 Thread Gilad Ben-Yossef
these problems going forward. These are just the fix ups for current code. Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org CC: Eric Biggers Gilad Ben-Yossef (4): crypto: handle EBUSY due to backlog correctly crypto: drbg wait for crypto op not signal safe crypto: gcm wait for

[PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-11 Thread Gilad Ben-Yossef
Biggers Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/drbg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index fa749f4..fa9054d 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1767,8 +1767,7 @@ static int

Re: [PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-18 Thread Gilad Ben-Yossef
On Thu, May 18, 2017 at 8:09 AM, Herbert Xu wrote: > On Thu, May 11, 2017 at 02:53:43PM +0300, Gilad Ben-Yossef wrote: >> drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to >> wait for completion of async crypto op but if a signal occurs it >> may return

[PATCH v2 3/4] crypto: gcm wait for crypto op not signal safe

2017-05-18 Thread Gilad Ben-Yossef
etion() instead. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/gcm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index b7ad808..3841b5e 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -1

[PATCH v2 4/4] crypto: Documentation: fix none signal safe sample

2017-05-18 Thread Gilad Ben-Yossef
. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst index d021fd9..944f08b 100644 --- a/Documentation/crypto

[PATCH v2 0/4] crypto: async crypto op fixes

2017-05-18 Thread Gilad Ben-Yossef
these problems going forward. These are just the fix ups for current code. Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org CC: Eric Biggers Gilad Ben-Yossef (4): crypto: handle EBUSY due to backlog correctly crypto: drbg wait for crypto op not signal safe crypto: gcm wait for

[PATCH v2 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-18 Thread Gilad Ben-Yossef
Biggers Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/drbg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index fa749f4..cdb27ac 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1767,9 +1767,8 @@ static int

[PATCH v2 1/4] crypto: handle EBUSY due to backlog correctly

2017-05-18 Thread Gilad Ben-Yossef
-after-free of buffers. Resolve this by handling -EBUSY correctly. Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/asymmetric_keys/public_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys

[PATCH v2 1/4] crypto: handle EBUSY due to backlog correctly

2017-05-18 Thread Gilad Ben-Yossef
-after-free of buffers. Resolve this by handling -EBUSY correctly. Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/asymmetric_keys/public_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys

[PATCH v2 4/4] crypto: Documentation: fix none signal safe sample

2017-05-18 Thread Gilad Ben-Yossef
. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst index d021fd9..944f08b 100644 --- a/Documentation/crypto

[PATCH v2 0/4] crypto: async crypto op fixes

2017-05-18 Thread Gilad Ben-Yossef
these problems going forward. These are just the fix ups for current code. Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org CC: Eric Biggers Gilad Ben-Yossef (4): crypto: handle EBUSY due to backlog correctly crypto: drbg wait for crypto op not signal safe crypto: gcm wait for

[PATCH v2 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-18 Thread Gilad Ben-Yossef
Biggers Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/drbg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index fa749f4..cdb27ac 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1767,9 +1767,8 @@ static int

[PATCH v2 3/4] crypto: gcm wait for crypto op not signal safe

2017-05-18 Thread Gilad Ben-Yossef
etion() instead. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef CC: sta...@vger.kernel.org --- crypto/gcm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index b7ad808..3841b5e 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -1

[PATCH v2 01/11] crypto: introduce crypto wait for async op

2017-05-29 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers CC: Ofir Drang --- crypto/api.c | 13 + include/linux/crypto.h | 41 + 2 files changed, 54 insertions(+) diff --git a/crypto/api.c b/crypto/api.c index 941cd4c

[PATCH v2 10/11] ima: move to generic async completion

2017-05-29 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 Acked-by: Mimi Zohar --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39

[PATCH v2 09/11] cifs: move to generic async completion

2017-05-29 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 Acked-by: Pavel Shilovsky --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/fs

[PATCH v2 07/11] dm: move dm-verity to generic async completion

2017-05-29 Thread Gilad Ben-Yossef
async op finishing. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h| 5 --- 2 files changed, 20 insertions(+), 66 deletions(-) diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity

[PATCH v2 11/11] crypto: adapt api sample to use async. op wait

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

[PATCH v2 08/11] fscrypt: move to generic async completion

2017-05-29 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 --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36 ++-- fs

[PATCH v2 04/11] crypto: move drbg to generic async completion

2017-05-29 Thread Gilad Ben-Yossef
the completion of the request any way. Signed-off-by: Gilad Ben-Yossef --- crypto/drbg.c | 34 -- include/crypto/drbg.h | 3 +-- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index cdb27ac..101d9f0 100644

[PATCH v2 02/11] crypto: move algif to generic async completion

2017-05-29 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 --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c | 29

[PATCH v2 06/11] crypto: move testmgr to generic async completion

2017-05-29 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 --- crypto/testmgr.c | 184

[PATCH v2 03/11] crypto: move pub key to generic async completion

2017-05-29 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 --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 insertions(+), 24 deletions

[PATCH v2 05/11] crypto: move gcm to generic async completion

2017-05-29 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 --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index

[PATCH v2 00/11] introduce crypto wait for async op

2017-05-29 Thread Gilad Ben-Yossef
x27; 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 (11): crypto: introduce crypto wait for async op crypto: move alg

Re: [PATCH v2 01/11] crypto: introduce crypto wait for async op

2017-06-10 Thread Gilad Ben-Yossef
On Sat, Jun 10, 2017 at 6:43 AM, Herbert Xu wrote: > On Mon, May 29, 2017 at 11:22:48AM +0300, Gilad Ben-Yossef wrote: >> >> +static inline int crypto_wait_req(int err, struct crypto_wait *wait) >> +{ >> + switch (err) { >> + case -

[PATCH v3 00/28] simplify crypto wait for async op

2017-07-02 Thread Gilad Ben-Yossef
line crypto_wait_req(). - Some code indentation fixes. Gilad Ben-Yossef (28): crypto: change backlog return code to -EIOCBQUEUED crypto: atmel: use -EIOCBQUEUED for backlog indication crypto: ccm: use -EIOCBQUEUED for backlog indication crypto: marvell/cesa: use -EIOCBQUEUED for backlog indi

[PATCH v3 01/28] crypto: change backlog return code to -EIOCBQUEUED

2017-07-02 Thread Gilad Ben-Yossef
st_flags(req) & CRYPTO_TFM_REQ_MAY_BACKLOG))) This patch changes the return code used to indicate a crypto op was queued in the backlog to -EIOCBQUEUED, thus resolving both issues. Signed-off-by: Gilad Ben-Yossef --- crypto/af_alg.c |

[PATCH v3 02/28] crypto: atmel: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/atmel-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v3 03/28] crypto: ccm: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/ccp/ccp-crypto-main.c | 10 +- drivers/crypto/ccp/ccp-dev.c

[PATCH v3 05/28] crypto: mediatek: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/mediatek/mtk-aes.c | 2 +- drivers/crypto/mediatek/mtk-sha.c | 2 +- 2 files

[PATCH v3 07/28] crypto: qce: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/qce/sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v3 09/28] dm: verity: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/md/dm-verity-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 11/28] cifs: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs

[PATCH v3 15/28] crypto: move algif to generic async completion

2017-07-02 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 --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c | 29

[PATCH v3 13/28] crypto: adapt api sample to -EIOCBQUEUED as backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. Documentation/crypto/api-samples.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 16/28] crypto: move pub key to generic async completion

2017-07-02 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 --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 insertions(+), 24 deletions

[PATCH v3 19/28] crypto: move testmgr to generic async completion

2017-07-02 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 --- crypto/testmgr.c | 204

[PATCH v3 22/28] cifs: move to generic async completion

2017-07-02 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 Acked-by: Pavel Shilovsky --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/fs

[PATCH v3 24/28] crypto: tcrypt: move to generic async completion

2017-07-02 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 --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(+), 59 deletions(-) diff --git

[PATCH v3 23/28] ima: move to generic async completion

2017-07-02 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 Acked-by: Mimi Zohar --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39

[PATCH v3 26/28] crypto: qce: move to generic async completion

2017-07-02 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 --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH v3 28/28] crypto: adapt api sample to use async. op wait

2017-07-02 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst index

[PATCH v3 20/28] dm: move dm-verity to generic async completion

2017-07-02 Thread Gilad Ben-Yossef
async op finishing. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h| 5 --- 2 files changed, 20 insertions(+), 66 deletions(-) diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity

[PATCH v3 17/28] crypto: move drbg to generic async completion

2017-07-02 Thread Gilad Ben-Yossef
the completion of the request any way. Signed-off-by: Gilad Ben-Yossef Acked-by: Stephan Muller --- 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 v3 27/28] crypto: mediatek: move to generic async completion

2017-07-02 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 --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26 deletions(-) diff

[PATCH v3 21/28] fscrypt: move to generic async completion

2017-07-02 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 --- fs/crypto/crypto.c | 29 + fs/crypto/fname.c | 36 ++-- fs

[PATCH v3 25/28] crypto: talitos: move to generic async completion

2017-07-02 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 --- drivers/crypto/talitos.c | 39 +-- 1 file changed, 5 insertions(+), 34 deletions(-) diff

[PATCH v3 14/28] crypto: introduce crypto wait for async op

2017-07-02 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers --- crypto/api.c | 13 + include/linux/crypto.h | 40 2 files changed, 53 insertions(+) diff --git a/crypto/api.c b/crypto/api.c index 941cd4c..2a2479d 100644 --- a

[PATCH v3 18/28] crypto: move gcm to generic async completion

2017-07-02 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 --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index

[PATCH v3 12/28] ima: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. security/integrity/ima/ima_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 10/28] fscrypt: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. fs/crypto/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs

[PATCH v3 04/28] crypto: marvell/cesa: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/marvell/cesa.c | 2 +- drivers/crypto/marvell/cesa.h | 2 +- 2 files changed

[PATCH v3 08/28] crypto: talitos: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v3 06/28] crypto: omap: use -EIOCBQUEUED for backlog indication

2017-07-02 Thread Gilad Ben-Yossef
Replace -EBUSY with -EIOCBQUEUED for backlog queueing indication as part of new API. Signed-off-by: Gilad Ben-Yossef --- This patch should be squashed with the first patch in the series when applied. drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v3 01/28] crypto: change backlog return code to -EIOCBQUEUED

2017-07-03 Thread Gilad Ben-Yossef
On Mon, Jul 3, 2017 at 3:35 PM, Herbert Xu wrote: > On Sun, Jul 02, 2017 at 05:41:43PM +0300, Gilad Ben-Yossef wrote: >> The crypto API was using the -EBUSY return value to indicate >> both a hard failure to submit a crypto operation into a >> transformation provider when th

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

2017-08-08 Thread Gilad Ben-Yossef
w 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: ccm: use -EAGAIN for transient busy indication crypto: remo

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

2017-08-08 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 --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell/cesa.h | 2 +- 2 files

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

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

[PATCH v4 17/19] crypto: qce: move to generic async completion

2017-08-08 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 --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH v4 18/19] crypto: mediatek: move to generic async completion

2017-08-08 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 --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26 deletions(-) diff

[PATCH v4 16/19] crypto: talitos: move to generic async completion

2017-08-08 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 --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(+), 33 deletions(-) diff

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

2017-08-08 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 --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(+), 59 deletions(-) diff --git

[PATCH v4 12/19] dm: move dm-verity to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
async op finishing. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h| 5 --- 2 files changed, 20 insertions(+), 66 deletions(-) diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity

[PATCH v4 13/19] cifs: move to generic async completion

2017-08-08 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 Acked-by: Pavel Shilovsky --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/fs

[PATCH v4 14/19] ima: move to generic async completion

2017-08-08 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 Acked-by: Mimi Zohar --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39

[PATCH v4 09/19] crypto: move gcm to generic async completion

2017-08-08 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 --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index

[PATCH v4 07/19] crypto: move pub key to generic async completion

2017-08-08 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 --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 insertions(+), 24 deletions

[PATCH v4 08/19] crypto: move drbg to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
the completion of the request any way. Signed-off-by: Gilad Ben-Yossef --- 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 index 633a88e..c522251 100644

[PATCH v4 10/19] crypto: move testmgr to generic async completion

2017-08-08 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 --- crypto/testmgr.c | 204

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

2017-08-08 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 --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36 ++-- fs

[PATCH v4 06/19] crypto: move algif to generic async completion

2017-08-08 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 --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_hash.c | 30

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

2017-08-08 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers --- crypto/api.c | 13 + include/linux/crypto.h | 41 + 2 files changed, 54 insertions(+) diff --git a/crypto/api.c b/crypto/api.c index 941cd4c..2a2479d 100644 --- a

[PATCH v4 02/19] crypto: ccm: use -EAGAIN for transient busy indication

2017-08-08 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/crypto/ccp/ccp-dev.c | 7 +-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a

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

2017-08-08 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 --- crypto/ahash.c| 12 +++- crypto/cts.c | 6 ++ crypto/lrw.c

[PATCH v4 01/19] crypto: change transient busy return code to -EAGAIN

2017-08-08 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 --- crypto/algapi.c | 6 ++

Re: [PATCH v4 06/19] crypto: move algif to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
On Tue, Aug 8, 2017 at 4:10 PM, Stephan Mueller wrote: > Am Dienstag, 8. August 2017, 14:03:37 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> algif starts several async crypto ops and waits for their completion. >> Move it over to generic code doing the same. > >

Re: [PATCH v4 02/19] crypto: ccm: use -EAGAIN for transient busy indication

2017-08-08 Thread Gilad Ben-Yossef
On Tue, Aug 8, 2017 at 6:24 PM, Gary R Hook wrote: > On 08/08/2017 07:03 AM, Gilad Ben-Yossef wrote: >> >> Replace -EBUSY with -EAGAIN when reporting transient busy >> indication in the absence of backlog. >> >> Signed-off-by: Gilad Ben-Yossef > > > Coul

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

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

[PATCH v5 09/19] crypto: move gcm to generic async completion

2017-08-14 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 --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index

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

2017-08-14 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst index

[PATCH v5 18/19] crypto: mediatek: move to generic async completion

2017-08-14 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 --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26 deletions(-) diff

[PATCH v5 17/19] crypto: qce: move to generic async completion

2017-08-14 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 --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/drivers

  1   2   3   >