[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 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 20/20] crypto: adapt api sample to use async. op wait

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

[PATCH v8 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 09/20] crypto: move drbg to generic async completion

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

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

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

[PATCH v8 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 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 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 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 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 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_

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 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 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 13/20] dm: move dm-verity to generic async completion

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

[PATCH v10 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 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 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 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 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 18/20] crypto: qce: move to generic async completion

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

[PATCH v10 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 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 14/20] cifs: move to generic async completion

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

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

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

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

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

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

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

[PATCH v10 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 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 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 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 12/20] fscrypt: move to generic async completion

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

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

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

Re: [PATCH 00/24] staging: ccree: more cleanup patches

2017-11-14 Thread Gilad Ben-Yossef
On Tue, Nov 14, 2017 at 11:48 AM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Tue, Nov 14, 2017 at 11:33:20AM +0200, Gilad Ben-Yossef wrote: >> On Mon, Nov 13, 2017 at 8:33 PM, Dan Carpenter <dan.carpen...@oracle.com> >> wrote: >> > These cleanups look

[PATCH 5/6] crypto: tcrypt: add multibuf skcipher speed test

2017-11-30 Thread Gilad Ben-Yossef
The performance of some skcipher tfm providers is affected by the amount of parallelism possible with the processing. Introduce an async skcipher concurrent multiple buffer processing speed test to be able to test performance of such tfm providers. Signed-off-by: Gilad Ben-Yossef <

[PATCH 4/6] crypto: tcrypt: add multi buf ahash jiffies test

2017-11-30 Thread Gilad Ben-Yossef
The multi buffer concurrent requests ahash speed test only supported the cycles mode. Add support for the so called jiffies mode that test performance of bytes/sec. We only add support for digest mode at the moment. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c

[PATCH 2/6] crypto: tcrypt: fix AEAD decryption speed test

2017-11-30 Thread Gilad Ben-Yossef
speed tests. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index d1fd033..56fb6a6 100644 --- a/crypto/tcrypt.c +++ b/crypto/tc

[PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-11-30 Thread Gilad Ben-Yossef
The performance of some aead tfm providers is affected by the amount of parallelism possible with the processing. Introduce an async aead concurrent multiple buffer processing speed test to be able to test performance of such tfm providers. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.

[PATCH 0/6] crypto: tcrypt: fix and add multi buf speed tests

2017-11-30 Thread Gilad Ben-Yossef
seems questionable. Do let me know if you disagree. The patch set is built on top of Robert Baronescu's patch titled "crypto: tcrypt - fix S/G table for test_aead_speed()" which was posted on the list, as without it the AEAD tests fails. Gilad Ben-Yossef (6): crypto: tcrypt: use

[PATCH 1/6] crypto: tcrypt: use multi buf for ahash mb test

2017-11-30 Thread Gilad Ben-Yossef
life scenario with regard to data cache and TLB behaviours etc. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 3ced1ba..d1fd033 100644 --- a/

[PATCH 3/6] crypto: tcrypt: allow setting num of bufs

2017-11-30 Thread Gilad Ben-Yossef
parameter that allows setting the number of multiple buffers/requests used, leaving the default at 8. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/crypto/tcry

Re: [PATCH 04/10] staging: ccree: staging: ccree: replace sysfs by debugfs interface

2017-12-16 Thread Gilad Ben-Yossef
On Thu, Dec 14, 2017 at 4:30 PM, Philippe Ombredanne <pombreda...@nexb.com> wrote: > Gilad, > > On Thu, Dec 14, 2017 at 3:02 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> The ccree driver has had a none standard sysfs interface for debugging. >> Replace i

Re: [PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-13 Thread Gilad Ben-Yossef
Hi Herbert, On Mon, Dec 11, 2017 at 1:35 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Thu, Nov 30, 2017 at 10:09:32AM +0000, Gilad Ben-Yossef wrote: >> The performance of some aead tfm providers is affected by >> the amount of parallelism possible with the proces

[PATCH 09/10] staging: ccree: fix fips event irq handling build

2017-12-14 Thread Gilad Ben-Yossef
When moving from internal for kernel FIPS infrastructure the FIPS event irq handling code was left with the old ifdef by mistake. Fix it. Fixes: b7e607bf33a2 ("staging: ccree: move FIPS support to kernel infrastructure") Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-

[PATCH 04/10] staging: ccree: staging: ccree: replace sysfs by debugfs interface

2017-12-14 Thread Gilad Ben-Yossef
The ccree driver has had a none standard sysfs interface for debugging. Replace it with a proper debugfs interface. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/Makefile | 3 +- drivers/staging/ccree/cc_debugfs.c

[PATCH 07/10] staging: ccree: turn compile time debug log to params

2017-12-14 Thread Gilad Ben-Yossef
The ccree driver has some support to dump runtime data to kernel log to assist in debugging. The code used to be enabled by a build time flag. Refactor to enable it via module/kernel parameters. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_co

[PATCH 06/10] staging: ccree: remove useless debug code

2017-12-14 Thread Gilad Ben-Yossef
Remove a bunch of useless debug code ifdef'ed out Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 45 - drivers/staging/ccree/ssi_config.h | 3 --- drivers/staging/ccree/ssi_driver.c

[PATCH 00/10] staging: ccree: cleanups & fixes

2017-12-14 Thread Gilad Ben-Yossef
- More cleanups and dead code removal. - Handle TODO item of moving none standard sysfs interface to debugfs - One fix to FIPS event irq handling code Gilad Ben-Yossef (10): staging: ccree: drop ifdef CONFIG_OF in code staging: ccree: clean up PM registration staging: ccree: add explicit

[PATCH 01/10] staging: ccree: drop ifdef CONFIG_OF in code

2017-12-14 Thread Gilad Ben-Yossef
As we already depend on CONFIG_OF via Kconfig no need to support conditional build without it. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_driver.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/s

[PATCH 05/10] staging: ccree: remove CC_IRQ_DELAY dead code

2017-12-14 Thread Gilad Ben-Yossef
Remove dead code from older version which is not supported in current hardware. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_config.h | 1 - drivers/staging/ccree/ssi_driver.c | 11 --- 2 files changed, 12 deletions(-) diff --git a/drivers/s

[PATCH 08/10] staging: ccree: remove ssi_config.h

2017-12-14 Thread Gilad Ben-Yossef
Now that the only thing left in ssi_config is the maximum DMA mask length we get move that to ssi_driver.h and get rid of the file. All of ccree is now runtime configurable or under Kbuild control. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_deb

[PATCH 10/10] staging: ccree: update TODO

2017-12-14 Thread Gilad Ben-Yossef
Update TODO with handling on sysfs -> debugfs transition Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/TODO | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO index f44edcd

Re: [PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-13 Thread Gilad Ben-Yossef
On Wed, Dec 13, 2017 at 2:31 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Wed, Dec 13, 2017 at 11:12:10AM +0200, Gilad Ben-Yossef wrote: >> >> I'm sorry if I'm confused but as the cover letter stated, the patch >> set is supposed to >> go on top of th

[PATCH 02/10] staging: ccree: clean up PM registration

2017-12-14 Thread Gilad Ben-Yossef
Clean up power management registration. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_driver.c | 16 +++- drivers/staging/ccree/ssi_pm.c | 4 drivers/staging/ccree/ssi_pm.h | 3 +++ 3 files changed, 10 insertions(+), 13 del

[PATCH 03/10] staging: ccree: add explicit module init/exit func

2017-12-14 Thread Gilad Ben-Yossef
We need to do a module global scope init/exit operation to support the debugfs interface we are about to introduce in the next patch, so wean the module of the boiler plate saving macro as it will no longer be sufficient. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/s

[PATCH RESEND] checkpatch: add *_ON_STACK to declaration_macros

2017-12-20 Thread Gilad Ben-Yossef
Add the crypto API *_ON_STACK to $declaration_macros. Resolves the following false warning: WARNING: Missing a blank line after declarations + int err; + SHASH_DESC_ON_STACK(desc, ctx_p->shash_tfm); Signed-off-by: Gilad Ben-Yossef <gi...@benyoss

[PATCH] staging: ccree: use size_t consistently

2017-12-19 Thread Gilad Ben-Yossef
Fix declaration, implementation and wrapper function to use the same size_t type we actually define the parameter to be. Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params") Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/

[PATCH v2 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-17 Thread Gilad Ben-Yossef
The performance of some aead tfm providers is affected by the amount of parallelism possible with the processing. Introduce an async aead concurrent multiple buffer processing speed test to be able to test performance of such tfm providers. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.

[PATCH v2 4/6] crypto: tcrypt: add multi buf ahash jiffies test

2017-12-17 Thread Gilad Ben-Yossef
The multi buffer concurrent requests ahash speed test only supported the cycles mode. Add support for the so called jiffies mode that test performance of bytes/sec. We only add support for digest mode at the moment. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c

[PATCH v2 5/6] crypto: tcrypt: add multibuf skcipher speed test

2017-12-17 Thread Gilad Ben-Yossef
The performance of some skcipher tfm providers is affected by the amount of parallelism possible with the processing. Introduce an async skcipher concurrent multiple buffer processing speed test to be able to test performance of such tfm providers. Signed-off-by: Gilad Ben-Yossef <

[PATCH v2 2/6] crypto: tcrypt: fix AEAD decryption speed test

2017-12-17 Thread Gilad Ben-Yossef
speed tests. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index a0c4e0d..69c8e63 100644 --- a/crypto/tcrypt.c +++ b/crypto/tc

[PATCH v2 0/6] crypto: tcrypt: fix and add multi buf speed tests

2017-12-17 Thread Gilad Ben-Yossef
of the none multi buffer speed test code better, but given that tcrypt as a whole is a developer testing harness rather than production code, the value of this activity seems questionable. Do let me know if you disagree. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Changes from v1: - r

[PATCH v2 3/6] crypto: tcrypt: allow setting num of bufs

2017-12-17 Thread Gilad Ben-Yossef
parameter that allows setting the number of multiple buffers/requests used, leaving the default at 8. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/crypto/tcry

[PATCH v2 1/6] crypto: tcrypt: use multi buf for ahash mb test

2017-12-17 Thread Gilad Ben-Yossef
life scenario with regard to data cache and TLB behaviours etc. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 28b4882..a0c4e0d 100644 --- a/

[PATCH 17/24] staging: ccree: refactor code with local vars

2017-11-13 Thread Gilad Ben-Yossef
Refactor the queue handling loop using local variables for better code readability. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_request_mgr.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging

[PATCH 16/24] staging: ccree: remove dead defs and decls

2017-11-13 Thread Gilad Ben-Yossef
Remove no longer definitions of enums and forward declaration of functions dealing with sysfs interface of the long removed ccree cycle counter. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_sysfs.h | 23 --- 1 file changed, 23 del

[PATCH 10/24] staging: ccree: document spinlock usage

2017-11-13 Thread Gilad Ben-Yossef
Document spinlock usage to protect against concurrent access to HW register which must occur a single request at a time. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_request_mgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging

[PATCH 12/24] staging: ccree: fix code indent

2017-11-13 Thread Gilad Ben-Yossef
Fix code ident not following the coding style. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_sysfs.c | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_ciphe

[PATCH 11/24] staging: ccree: constify help string

2017-11-13 Thread Gilad Ben-Yossef
Make help string static const Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_sysfs.c b/drivers/staging/ccree/ssi_sysfs.c index 5d39f15..8d50382

[PATCH 13/24] staging: ccree: Replace CONFIG_PM_RUNTIME with CONFIG_PM

2017-11-13 Thread Gilad Ben-Yossef
After commit b2b49ccbdd54 ("PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected") PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM. Signed-off-by: Gilad Ben-

[PATCH 14/24] staging: ccree: replace macro with inline func

2017-11-13 Thread Gilad Ben-Yossef
Replace GET_DMA_BUFFER_TYPE with an inline function variant with type checking. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_buffer_mgr.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/staging

[PATCH 05/24] staging: ccree: move logical cont. to 1st line

2017-11-13 Thread Gilad Ben-Yossef
Move logical continuations to first line for readability. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_buffer_mgr.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging

[PATCH 04/24] staging: ccree: remove MIN/MAX macros

2017-11-13 Thread Gilad Ben-Yossef
The driver was using open coded MIN/MAX macros to compute fixed defines. Remove them and use bigger value always instead. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.h | 2 +- drivers/staging/ccree/ssi_driver.h | 3 --- drivers/staging

[PATCH 03/24] staging: ccree: remove unnecessary parentheses

2017-11-13 Thread Gilad Ben-Yossef
Remove unnecessary parentheses in if statements across the driver. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 36 +- drivers/staging/ccree/ssi_buffer_mgr.c | 28 +- drivers/s

[PATCH 01/24] staging: ccree: fix typos

2017-11-13 Thread Gilad Ben-Yossef
Fix a bunch of comment typos. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_hash.c| 2 +- drivers/staging/ccree/ssi_hash.h| 2 +- drivers/staging/ccree/ssi_ivgen.c | 2 +- drivers/staging/ccree/ssi_request_mgr.c | 2 +- drivers/s

[PATCH 00/24] staging: ccree: more cleanup patches

2017-11-13 Thread Gilad Ben-Yossef
Another set of cleanup patches. This set goes on top of the previous fixes and cleanups patch set sent to the list. With this set of patches checkpatch now only reports one false warning and a warning on device tree string being undocumented. Gilad Ben-Yossef (24): staging: ccree: fix typos

[PATCH 08/24] staging: ccree: make mem barrier per request

2017-11-13 Thread Gilad Ben-Yossef
The driver was issuing a write memory barrier per each HW descriptor written but these descriptors are written in groups and we really only need one per group. White at it, document memory barrier reason. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging

[PATCH 06/24] staging: ccree: remove unneeded empty lines

2017-11-13 Thread Gilad Ben-Yossef
Remove uneeded empty lines that crept in to code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_buffer_mgr.c | 1 - drivers/staging/ccree/ssi_hash.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/d

[PATCH 09/24] staging: ccree: replace open coded loop with for

2017-11-13 Thread Gilad Ben-Yossef
Replace open coded register writing loop with a for. Further simplify code by using a local var to precompute the register address for readability. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_request_mgr.c | 16 +--- 1 file chan

[PATCH 07/24] staging: ccree: remove unneeded cast

2017-11-13 Thread Gilad Ben-Yossef
Remove uneeded cast from writel_relaxed parameter. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_request_mgr.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging

[PATCH 02/24] staging: ccree: alloc by instance not type

2017-11-13 Thread Gilad Ben-Yossef
Allocation by instance is preferred to allocation by type. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_sram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_sram_mgr.c b/drivers/staging

[PATCH 21/24] staging: ccree: remove unused field

2017-11-13 Thread Gilad Ben-Yossef
Field monitor_null_cycles of struct drvdata was not being used. Remove it. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_driver.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_dr

[PATCH 24/24] staging: ccree: drop unused macro

2017-11-13 Thread Gilad Ben-Yossef
The CC_REG_NAME macro is unused. Drop it. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_hw_queue_defs.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ccree/cc_hw_queue_defs.h b/drivers/staging/ccree/cc_hw_queue_defs.h index 2

[PATCH 23/24] staging: ccree: use local vars for readability

2017-11-13 Thread Gilad Ben-Yossef
Refactor cc_map_aead_request() to use local vars for addresses for better readability of code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_buffer_mgr.c | 64 +++--- 1 file changed, 29 insertions(+), 35 deletions(-) diff

[PATCH 20/24] staging: ccree: remove unneeded wrapper function

2017-11-13 Thread Gilad Ben-Yossef
Remove unneeded wrapper function to simplify code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_hash.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging

[PATCH 18/24] staging: ccree: rename func for readability

2017-11-13 Thread Gilad Ben-Yossef
Rename the insanely long ssi_ahash_get_larval_digest_sram_addr() func to cc_larval_digest_addr() for better code readability Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 7 +++ drivers/staging/ccree/ssi_hash.c | 13 ++--- d

[PATCH 22/24] staging: ccree: replace msleep with a completion

2017-11-13 Thread Gilad Ben-Yossef
. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_driver.c | 2 ++ drivers/staging/ccree/ssi_driver.h | 1 + drivers/staging/ccree/ssi_request_mgr.c | 7 +-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 19/24] staging: ccree: rename long define for readability

2017-11-13 Thread Gilad Ben-Yossef
Rename the too long SSI_MAX_HASH_OPAD_TMP_KEYS_SIZE to SSI_MAX_OPAD_KEYS_SIZE for better code readability. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

Re: [PATCH 00/24] staging: ccree: more cleanup patches

2017-11-14 Thread Gilad Ben-Yossef
in places where you know the probable code flow of course). Any hints? -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru

Re: [PATCH 07/24] staging: ccree: remove unneeded cast

2017-11-14 Thread Gilad Ben-Yossef
On Mon, Nov 13, 2017 at 5:41 PM, Joe Perches <j...@perches.com> wrote: > > On Mon, 2017-11-13 at 14:45 +0000, Gilad Ben-Yossef wrote: > > Remove uneeded cast from writel_relaxed parameter. > [] > > diff --git a/drivers/staging/ccree/ssi_request_mgr.c > > b/driver

[PATCH 15/24] staging: ccree: trim long lines for readability

2017-11-13 Thread Gilad Ben-Yossef
The ccree driver did not adhere to the kernel max 80 chars per line limit making the code hard to follow. Fix this by breaking long lines and in some cases, moving comments to a separate line from code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_

[PATCHi v2] dt-bindings: add device tree binding for Arm TrustZone CryptoCell crypto engine

2017-11-15 Thread Gilad Ben-Yossef
The Arm TrustZone CryptoCell is a hardware security engine. This patch adds DT bindings for its Rich Execution Environment crypto engine. A driver supporting this device is already present in the staging tree. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Rob Herr

[PATCH] dt-bindings: add device tree binding for Arm TrustZone CryptoCell crypto engine

2017-11-15 Thread Gilad Ben-Yossef
The Arm TrustZone CryptoCell is a hardware security engine. This patch adds DT bindings for its Rich Execution Environment crypto engine. A driver supporting this device is already present in the staging tree. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- .../devicetree/bi

Re: [PATCH 3/3] staging: ccree: simplify ioread/iowrite

2017-11-06 Thread Gilad Ben-Yossef
On Mon, Nov 6, 2017 at 10:37 AM, Tobin C. Harding <m...@tobin.cc> wrote: > On Mon, Nov 06, 2017 at 06:55:52AM +0000, Gilad Ben-Yossef wrote: >> Registers ioread/iowrite operations were done via macros, >> sometime using a "magical" implicit parameter. >> >&

[PATCH 3/3] staging: ccree: simplify ioread/iowrite

2017-11-05 Thread Gilad Ben-Yossef
Registers ioread/iowrite operations were done via macros, sometime using a "magical" implicit parameter. Replace all register access with simple inline macros. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_hal.h | 33 ---

[PATCH 2/3] staging: ccree: simplify registers access

2017-11-05 Thread Gilad Ben-Yossef
The register offset calculation macro was taking a HW block base parameter that was not actually used. Simplify the whole thing by dropping it and rename the macro for better readability. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_regs.h

[PATCH 0/3] More code cleanups

2017-11-05 Thread Gilad Ben-Yossef
Additional code readability and simplification patches. These goes on top the previous patch set sent to the list. Gilad Ben-Yossef (3): staging: ccree: simplify error handling logic staging: ccree: simplify registers access staging: ccree: simplify ioread/iowrite drivers/staging/ccree

[PATCH 1/3] staging: ccree: simplify error handling logic

2017-11-05 Thread Gilad Ben-Yossef
Turn the code sites that don't require any special handling on error return to a simple return. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_driver.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/d

<    1   2   3   4   5   6   7   8   9   10   >