[PATCH v2 08/10] staging: ccree: remove compare to none zero

2017-11-09 Thread Gilad Ben-Yossef
The driver was full of code checking "if (x != 0)". Replace by "if (x)" for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 28 +-- drivers/staging/ccree/ssi_buffer_mgr.c | 74 ++--- d

[PATCH v2 06/10] staging: ccree: simplify pm manager using local var

2017-11-09 Thread Gilad Ben-Yossef
Make the code more readable by using a local variable. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_pm.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_pm.c b/drivers/staging/ccree/ssi_pm.c index e1bc4c5..d60143c

[PATCH v2 05/10] staging: ccree: fold common code into function

2017-11-09 Thread Gilad Ben-Yossef
Fold common code copying MAC to/from a temp. buffer into an inline function instead of keeping multiple open coded versions of same. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 89 ++ 1 file changed, 37 insertions(+), 52 deletions

[PATCH v2 03/10] staging: ccree: simplify AEAD using local var

2017-11-09 Thread Gilad Ben-Yossef
Make the code more readable by using a local variable for commonly use expression in the AEAD part of the driver. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c

[PATCH v2 01/10] staging: ccree: fix leak of import() after init()

2017-11-09 Thread Gilad Ben-Yossef
is not already initialized. Fixes: commit 454527d0d94f ("staging: ccree: fix hash import/export") Cc: stable Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c

Re: [PATCH] staging: ccree: remove unused pointer cc_base

2017-11-09 Thread Gilad Ben-Yossef
this fix but also deals with other occurrences of the same now no-longer needed cc_base variable just a second ago before checking my email... Sorry about that and thanks again. Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a s

Re: [PATCH v5] Staging: ccree: Remove unused variable.

2017-09-07 Thread Gilad Ben-Yossef
Hi, On Thu, Sep 7, 2017 at 10:49 AM, Srishti Sharma wrote: > Remove the local variable inflight_counter as it is never used. > > Signed-off-by: Srishti Sharma > --- I've been meaning to clean that for some time now and never got around to do it. Thank you! :-) Acked-by: Gila

Re: [PATCH 8/8] staging: ccree: remove BUG macro usage

2017-09-07 Thread Gilad Ben-Yossef
On Wed, Sep 6, 2017 at 10:28 PM, Dan Carpenter wrote: > On Sun, Sep 03, 2017 at 11:56:50AM +0300, Gilad Ben-Yossef wrote: >> @@ -1154,7 +1150,8 @@ static inline int ssi_buffer_mgr_aead_chain_data( >> //if have reached the end of the sgl, then thi

[PATCH v3 1/8] staging: ccree: Replace kzalloc with devm_kzalloc

2017-09-07 Thread Gilad Ben-Yossef
detach, otherwise it leads to a double free. (c) remove unnecessary blank lines. Signed-off-by: Suniel Mahesh [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 11 --- 1 file changed, 4 insertions(+), 7

[PATCH v3 0/8] staging: ccree: more cleanup work for 4.15

2017-09-07 Thread Gilad Ben-Yossef
else block"). Changes from v2: - Cleanup return after error in BUG replacement patch as suggested by Dan Carpenter Changes from v1: - Fix kbuild reported error of "label at end of compound statement" Gilad Ben-Yossef (5): staging: ccree: simplify resource release on error st

[PATCH v3 4/8] staging: ccree: simplify resource release on error

2017-09-07 Thread Gilad Ben-Yossef
The resource release on probe/init error was being handled in an awkward manner and possibly leaking memory on certain (unlikely) error path. Fix it by simplifying the error resource release and making it easier to track. Reported-by: Dan Carpenter Signed-off-by: Gilad Ben-Yossef --- drivers

[PATCH v3 5/8] staging: ccree: remove unused completion

2017-09-07 Thread Gilad Ben-Yossef
icache_setup_completion is no longer used. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 -- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c

[PATCH v3 8/8] staging: ccree: remove BUG macro usage

2017-09-07 Thread Gilad Ben-Yossef
Replace BUG() macro usage that crash the kernel with alternatives that signal error and/or try to recover. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 18 ++ drivers/staging/ccree/ssi_cipher.c | 1 - drivers/staging/ccree/ssi_pm.c

[PATCH v3 6/8] staging: ccree: move over to BIT macro for bit defines

2017-09-07 Thread Gilad Ben-Yossef
Use BIT macro for bit definitions where needed. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.h | 10 +- drivers/staging/ccree/ssi_driver.c | 3 ++- drivers/staging/ccree/ssi_driver.h | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git

[PATCH v3 3/8] staging: ccree: Use platform_get_irq and devm_request_irq

2017-09-07 Thread Gilad Ben-Yossef
as it seems redundant. (e) free_irq is not required any more, devm_request_irq() free's it on driver detach. (f) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh Acked-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 30

[PATCH v3 7/8] staging: ccree: replace noop macro with inline

2017-09-07 Thread Gilad Ben-Yossef
Replace noop macro with a noop inline function Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 06a3c48..81ba827 100644

[PATCH v3 2/8] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-09-07 Thread Gilad Ben-Yossef
region on driver detach. (d) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 60 ++ drivers

Re: [PATCH V2] staging: ccree: Fix format/argument mismatches

2017-08-06 Thread Gilad Ben-Yossef
maybe we need to add a printk format like for dma addresses. I wanted to add the M32R kernel mailing list but it seems the arch has been orphaned and the web site is a a maze of twisty little 404s, all alike. Is that thing still alive? Gilad -- Gilad Ben-Yossef Chief Coffee Drinker

[PATCH 2/2] crypto: add SM3 test vectors

2017-08-21 Thread Gilad Ben-Yossef
Add testmgr and tcrypt tests and vectors for SM3 secure hash. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 14 +++- crypto/testmgr.c | 6 + crypto/testmgr.h | 67 3 files changed, 86 insertions(+), 1 deletion

[PATCH 0/2] crypto: add OSCCA SM3 secure hash and tests

2017-08-21 Thread Gilad Ben-Yossef
References: http://www.oscca.gov.cn/UpFile/20101222141857786.pdf https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash Tested via testmgr and tcrypt on Arm 64 and 32 bit. Compile tested for x86_64. Gilad Ben-Yossef (2): crypto: add OSCCA SM3 secure hash crypto: add SM3 test vectors cryp

[PATCH 1/2] crypto: add OSCCA SM3 secure hash

2017-08-21 Thread Gilad Ben-Yossef
Add OSCCA SM3 secure hash (OSCCA GM/T 0004-2012 SM3) generic hash transformation. Signed-off-by: Gilad Ben-Yossef --- crypto/Kconfig| 11 +++ crypto/Makefile | 1 + crypto/sm3_generic.c | 210 ++ include/crypto/sm3.h

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 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. > > > > This a

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 wrote: > On Mon, 14 Aug 2017 18:21:15 +0300 > Gilad Ben-Yossef wrote: > >> Invoking a possibly async. crypto op and waiting for completion >> while correctly handling backlog processing is a common task >> in th

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

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

[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 Reviewed-by: Gary R Hook --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/crypto/ccp/ccp-dev.c | 7 +-- 2 files changed, 8 insertions(+), 7

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

[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 Acked-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell

[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 CC: Eric Biggers CC: Jonathan Cameron --- 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

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

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

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

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

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

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

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

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

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

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

[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 Acked-by: Ryder Lee --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26

[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 --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_hash.c | 30

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

[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

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

2017-08-08 Thread Gilad Ben-Yossef
e 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: remove redundant back

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

[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
for 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 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 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 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 12/19] dm: move dm-verity to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
to the 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 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 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 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 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 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

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

[BUGFIX PATCH] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
;) Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index af9afea..01011a2 100644 --- a/drivers/

Re: [BUGFIX PATCH] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
On Wed, Aug 23, 2017 at 10:47 AM, Stephan Mueller wrote: > Am Mittwoch, 23. August 2017, 09:41:11 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> >> if (areq) { >> + /* >> + * The crypto API expects

[BUGFIX PATCH v2] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
;) Signed-off-by: Gilad Ben-Yossef --- Changes from v1: - Free memory on error path, as pointed out by Stephan Mueller. drivers/staging/ccree/ssi_cipher.c | 40 ++ 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher

Re: [BUGFIX PATCH v2] staging: ccree: save ciphertext for CTS IV

2017-08-23 Thread Gilad Ben-Yossef
On Wed, Aug 23, 2017 at 1:03 PM, Stephan Mueller wrote: > Am Mittwoch, 23. August 2017, 11:12:05 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> The crypto API requires saving the last blocks of ciphertext >> in req->info for use as IV for CTS mode. The cc

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

2017-08-24 Thread Gilad Ben-Yossef
t; > 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-allmodconfig (attached as .co

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

[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 Reviewed-by: Gary R Hook --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/crypto/ccp/ccp-dev.c | 7 +-- 2 files changed, 8 insertions(+), 7

[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 --- crypto/ahash.c| 12 +++- crypto/cts.c | 6 ++ crypto/lrw.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 Acked-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell

[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 CC: Eric Biggers CC: Jonathan Cameron --- 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

[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 --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_hash.c | 30

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

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

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

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

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

2017-08-24 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 CC: Mikulas Patocka --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h| 5 --- 2 files changed, 20

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

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

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

[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 Acked-by: Ryder Lee --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26

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

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

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

2017-09-03 Thread Gilad Ben-Yossef
>> - Update the drbg change to account for new init as >> indicated by Stephan Muller. >> >> Changes from v1: >> - Address review comments from Eric Biggers. >> - Separated out bug fixes of existing code and rebase >> on top of that patch set. >

[PATCH 6/8] staging: ccree: move over to BIT macro for bit defines

2017-09-03 Thread Gilad Ben-Yossef
Use BIT macro for bit definitions where needed. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.h | 10 +- drivers/staging/ccree/ssi_driver.c | 3 ++- drivers/staging/ccree/ssi_driver.h | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git

[PATCH 5/8] staging: ccree: remove unused completion

2017-09-03 Thread Gilad Ben-Yossef
icache_setup_completion is no longer used. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 -- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c

[PATCH 8/8] staging: ccree: remove BUG macro usage

2017-09-03 Thread Gilad Ben-Yossef
Replace BUG() macro usage that crash the kernel with alternatives that signal error and/or try to recover. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 14 ++ drivers/staging/ccree/ssi_cipher.c | 1 - drivers/staging/ccree/ssi_pm.c

[PATCH 2/8] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-09-03 Thread Gilad Ben-Yossef
region on driver detach. (d) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 60 ++ drivers

[PATCH 0/8] staging: ccree: more cleanup work for 4.14

2017-09-03 Thread Gilad Ben-Yossef
else block"). Gilad Ben-Yossef (5): staging: ccree: simplify resource release on error staging: ccree: remove unused completion staging: ccree: move over to BIT macro for bit defines staging: ccree: replace noop macro with inline staging: ccree: remove BUG macro usage Suniel

[PATCH 7/8] staging: ccree: replace noop macro with inline

2017-09-03 Thread Gilad Ben-Yossef
Replace noop macro with a noop inline function Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 06a3c48..81ba827 100644

[PATCH 4/8] staging: ccree: simplify resource release on error

2017-09-03 Thread Gilad Ben-Yossef
The resource release on probe/init error was being handled in an awkward manner and possibly leaking memory on certain (unlikely) error path. Fix it by simplifying the error resource release and making it easier to track. Reported-by: Dan Carpenter Signed-off-by: Gilad Ben-Yossef --- drivers

[PATCH 3/8] staging: ccree: Use platform_get_irq and devm_request_irq

2017-09-03 Thread Gilad Ben-Yossef
as it seems redundant. (e) free_irq is not required any more, devm_request_irq() free's it on driver detach. (f) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh Acked-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 30

[PATCH 1/8] staging: ccree: Replace kzalloc with devm_kzalloc

2017-09-03 Thread Gilad Ben-Yossef
detach, otherwise it leads to a double free. (c) remove unnecessary blank lines. Signed-off-by: Suniel Mahesh [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 11 --- 1 file changed, 4 insertions(+), 7

<    7   8   9   10   11   12   13   14   15   16   >