[PATCH v2 12/20] staging: ccree: remove cycle count debug support

2017-06-01 Thread Gilad Ben-Yossef
The ccree driver had support for rough performance debugging via cycle counting which has bit rotted and can easily be replcaed with perf. Remove it from the driver. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 14 drivers/staging/ccree/ssi_aead.c

[PATCH v2 16/20] staging: ccree: use snake_case for hash enums

2017-06-01 Thread Gilad Ben-Yossef
Hash enum were named using CamelCase, move over to snake_case. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 4 ++-- drivers/staging/ccree/hash_defs.h| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree

[PATCH v2 17/20] staging: ccree: drop no longer used macro

2017-06-01 Thread Gilad Ben-Yossef
MSB64 macro is no longer used or needed. Drop it. Signed-off-by: Gilad Ben-Yossef --- 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 1cbd2e1..aaa56c8 100644

[PATCH v2 18/20] staging: ccree: remove dead code

2017-06-01 Thread Gilad Ben-Yossef
Remove some unused macro definitions from hash definitions. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/hash_defs.h | 31 +++ 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/drivers/staging/ccree/hash_defs.h b/drivers/staging/ccree

[PATCH v2 20/20] staging: ccree: fix wrong whitespace usage

2017-06-01 Thread Gilad Ben-Yossef
Some of the register definition files had none kernel coding style usage of tabs vs. spaces in macro definitions. This patch fixes them. Remove some unused macro definitions from hash definitions. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/dx_crys_kernel.h | 308

[PATCH v2 19/20] staging: ccree: remove spurious blank line

2017-06-01 Thread Gilad Ben-Yossef
Remove spurious blank line from cc_regs.h Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_regs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ccree/cc_regs.h b/drivers/staging/ccree/cc_regs.h index e83938b..915c863 100644 --- a/drivers/staging/ccree/cc_regs.h

[PATCH v2 15/20] staging: ccree: remove unused struct

2017-06-01 Thread Gilad Ben-Yossef
struct SepHashPrivateContext is not used anywhere in the code. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/hash_defs.h | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/ccree/hash_defs.h b/drivers/staging/ccree/hash_defs.h index

[PATCH v2 14/20] staging: ccree: remove custom bitfield macros

2017-06-01 Thread Gilad Ben-Yossef
With all users removed or re-factored to use the standard kernel bit fields ops we can now drop the custom bit field macros. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_bitops.h| 39 --- drivers/staging/ccree/cc_hw_queue_defs.h | 2 +- drivers/staging

[PATCH v2 10/20] staging: ccree: move M/LLI defines to header file

2017-06-01 Thread Gilad Ben-Yossef
A bunch of macros used to define M/LLI descriptors where being defined in the C file. Move them over to private include file where other relevant definitions are stored. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_lli_defs.h| 8 drivers/staging/ccree

[PATCH v2 05/20] staging: ccree: fix comments formatting

2017-06-01 Thread Gilad Ben-Yossef
A few of the comments in cc_crypto_ctx.h where not formatted correctly. Format according to coding style guidelines. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/staging

Re: [PATCH] staging: ccree: add CRYPTO dependency

2017-05-21 Thread Gilad Ben-Yossef
ne CryptoCell C7XX family of Crypto > accelerators" > - depends on CRYPTO_HW && OF && HAS_DMA > + depends on CRYPTO && CRYPTO_HW && OF && HAS_DMA > default n > select CRYPTO_HASH > select CRYPTO_BLKCIPHER > -- > 2.9.0 > Thank you and Acked-By: Gilad Ben-Yossef -- 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

[BUGFIX PATCH] staging: ccree: fix buffer copy

2017-06-06 Thread Gilad Ben-Yossef
ll HW driver"). Signed-off-by: Gilad Ben-Yossef --- Please roll this patch into 4.12-rc5 if possible. drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_m

Re: [PATCH 3/6] ccree: use constant time memory comparison for macs and tags

2017-06-10 Thread Gilad Ben-Yossef
n-ups. Thanks, Gilad > Signed-off-by: Jason A. Donenfeld > Cc: Gilad Ben-Yossef > Cc: Greg Kroah-Hartman > Cc: sta...@vger.kernel.org > --- > drivers/staging/ccree/ssi_fips_ll.c | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > >

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 -

[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 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 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 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 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 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 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 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 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: [PATCH] staging: ccree: local variable "dev" not required

2017-10-05 Thread Gilad Ben-Yossef
(unlikely(rc != 0)) { > - dev_err(dev, "ssi_ivgen_init failed\n"); > + dev_err(&plat_dev->dev, "ssi_ivgen_init failed\n"); > goto post_power_mgr_err; > } > > /* Allocate crypto algs */ > rc = s

Re: [PATCH] staging:ccree Fix use BIT macro

2017-09-24 Thread Gilad Ben-Yossef
such a fix s already present in the staging-next tree. I suggest you base your patches to ccree on that tree as it is the most current for this driver. Thanks again, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where

Re: [PATCH] staging:ccree Fix avoid externs in .c files

2017-09-24 Thread Gilad Ben-Yossef
eing things that are already gone from the downstream staging tree. Thanks, Gilad -- 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

[PATCH 0/4] staging: ccree: logging related coding style fixes

2017-10-02 Thread Gilad Ben-Yossef
. Patch set based upon commit 1cd5929ab675 ("staging: greybus: light: remove unnecessary error check") in the staging-next tree. Signed-off-by: Gilad Ben-Yossef Gilad Ben-Yossef (4): staging: ccree: remove sysfs if of deleted code staging: ccree: simplify access to struct device

[PATCH 4/4] staging: ccree: simplify OOM handling

2017-10-02 Thread Gilad Ben-Yossef
Simplify handling of memory allocation failures and remove redundant log messages Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 11 -- drivers/staging/ccree/ssi_driver.c | 1 - drivers/staging/ccree/ssi_hash.c | 42

[PATCH 1/4] staging: ccree: remove sysfs if of deleted code

2017-10-02 Thread Gilad Ben-Yossef
The ccree cycle count mechanism was removed in commit 7f821f0c6ffa ("staging: ccree: remove cycle count debug support") but the sysfs interface lingered on. Remove it now. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_sysfs.c | 266

[PATCH 3/4] staging: ccree: move to generic device log infra

2017-10-02 Thread Gilad Ben-Yossef
Move over from using macro wrappers around to printk to dev_err, dev_dbg and friends and clean up resulting fallout. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 226 ++ drivers/staging/ccree/ssi_buffer_mgr.c | 394

[PATCH 2/4] staging: ccree: simplify access to struct device

2017-10-02 Thread Gilad Ben-Yossef
Introduce a DEV macro to retrieve struct device from private data structure in preparation to replacing custom logging macros with proper dev_dbg and friends which require struct device. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 11 --- drivers/staging

[PATCH v2 0/4] staging: ccree: logging related coding style fixes

2017-10-03 Thread Gilad Ben-Yossef
change. Patch set based upon commit 1cd5929ab675 ("staging: greybus: light: remove unnecessary error check") in the staging-next tree. Signed-off-by: Gilad Ben-Yossef Changes from v1: - Turn DEV macro into drvdats_to_dev inline function as suggested by Joe Perches. - Fix a compi

[PATCH v2 1/4] staging: ccree: remove sysfs if of deleted code

2017-10-03 Thread Gilad Ben-Yossef
The ccree cycle count mechanism was removed in commit 7f821f0c6ffa ("staging: ccree: remove cycle count debug support") but the sysfs interface lingered on. Remove it now. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_sysfs.c | 266

[PATCH v2 2/4] staging: ccree: simplify access to struct device

2017-10-03 Thread Gilad Ben-Yossef
Introduce a function to retrieve struct device from private data structure in preparation to replacing custom logging macros with proper dev_dbg and friends which require struct device. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 11 --- drivers/staging

Re: [PATCH 2/4] staging: ccree: simplify access to struct device

2017-10-03 Thread Gilad Ben-Yossef
On Mon, Oct 2, 2017 at 1:00 PM, Joe Perches wrote: > On Mon, 2017-10-02 at 10:03 +0100, Gilad Ben-Yossef wrote: >> Introduce a DEV macro to retrieve struct device from private >> data structure in preparation to replacing custom logging >> macros with proper dev_dbg and

[PATCH v2 3/4] staging: ccree: move to generic device log infra

2017-10-03 Thread Gilad Ben-Yossef
Move over from using macro wrappers around to printk to dev_err, dev_dbg and friends and clean up resulting fallout. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 226 ++ drivers/staging/ccree/ssi_buffer_mgr.c | 394

[PATCH v2 4/4] staging: ccree: simplify OOM handling

2017-10-03 Thread Gilad Ben-Yossef
Simplify handling of memory allocation failures and remove redundant log messages Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 11 -- drivers/staging/ccree/ssi_driver.c | 1 - drivers/staging/ccree/ssi_hash.c | 42

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 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/crypto/algif_hash.c >> +++ b/crypt

Re: [PATCH v2 02/20] staging: ccree: replace bit shift with BIT macro

2017-06-03 Thread Gilad Ben-Yossef
On Sat, Jun 3, 2017 at 11:46 AM, Greg Kroah-Hartman wrote: > On Thu, Jun 01, 2017 at 02:02:52PM +0300, Gilad Ben-Yossef wrote: >> CC_CTX_SIZE was being defined using a hand rolled bit shift operation. >> Replace with use of BIT macro. >> >> Signed-off-by: Gilad Ben

[PATCH v3 00/18] additional driver cleanups

2017-06-04 Thread Gilad Ben-Yossef
the patches - Better line breakup for code clarity as suggested by Joe Perches Gilad Ben-Yossef (18): staging: ccree: replace bit shift with BIT macro staging: ccree: refactor HW command FIFO access staging: ccree: remove 48 bit dma addr sim staging: ccree: refactor LLI access macros stagin

[PATCH v3 05/18] staging: ccree: move M/LLI defines to header file

2017-06-04 Thread Gilad Ben-Yossef
A bunch of macros used to define M/LLI descriptors where being defined in the C file. Move them over to private include file where other relevant definitions are stored. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_lli_defs.h| 8 drivers/staging/ccree

[PATCH v3 01/18] staging: ccree: replace bit shift with BIT macro

2017-06-04 Thread Gilad Ben-Yossef
CC_CTX_SIZE was being defined using a hand rolled bit shift operation. Replace with use of BIT macro. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers

[PATCH v3 06/18] staging: ccree: remove unused debug macros

2017-06-04 Thread Gilad Ben-Yossef
The DUMP_SGL() and DUMP_MLLI_TABLE() debug macros were defined but not used anywhere and the difference of their definitions for debug vs. none debug indicated this has not being used in a while. Remove the dead code. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c

[PATCH v3 12/18] staging: ccree: drop no longer used macro

2017-06-04 Thread Gilad Ben-Yossef
MSB64 macro is no longer used or needed. Drop it. Signed-off-by: Gilad Ben-Yossef --- 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 1cbd2e1..aaa56c8 100644

[PATCH v3 04/18] staging: ccree: refactor LLI access macros

2017-06-04 Thread Gilad Ben-Yossef
. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_lli_defs.h| 39 ++ drivers/staging/ccree/ssi_buffer_mgr.c | 8 +++ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ccree/cc_lli_defs.h b/drivers/staging/ccree

[PATCH v3 09/18] staging: ccree: remove custom bitfield macros

2017-06-04 Thread Gilad Ben-Yossef
With all users removed or re-factored to use the standard kernel bit fields ops we can now drop the custom bit field macros. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_bitops.h| 39 -- drivers/staging/ccree/cc_hw_queue_defs.h | 2 +- drivers/staging

[PATCH v3 17/18] staging: ccree: remove last remnants of sblkcipher

2017-06-04 Thread Gilad Ben-Yossef
The cipher code had some left overs of an attempt to support synch. cipher API with the HW. Remove the code handling this. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 102 +++-- drivers/staging/ccree/ssi_driver.h | 1 - 2 files

[PATCH v3 16/18] staging: ccree: remove last remnants of sash algo

2017-06-04 Thread Gilad Ben-Yossef
The hash code had some left overs from a misguided attempt to support shash API with the HW. Remove the code handling this. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 448 +++ 1 file changed, 127 insertions(+), 321 deletions

[PATCH v3 08/18] staging: ccree: move request_mgr to generic bitfield ops

2017-06-04 Thread Gilad Ben-Yossef
request_mgr was using custom bit field macros. move over to standard kernel bitfield ops. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_regs.h | 5 + drivers/staging/ccree/ssi_request_mgr.c | 27 +-- 2 files changed, 22 insertions(+), 10

[PATCH v3 15/18] staging: ccree: fix wrong whitespace usage

2017-06-04 Thread Gilad Ben-Yossef
Some of the register definition files had none kernel coding style usage of tabs vs. spaces in macro definitions. This patch fixes them. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/dx_crys_kernel.h | 308 - drivers/staging/ccree/dx_host.h

[PATCH v3 18/18] staging: ccree: remove descriptor context definitions

2017-06-04 Thread Gilad Ben-Yossef
Remove definitions of descriptor context which are not used in the driver. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h | 86 --- 1 file changed, 86 deletions(-) diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging

[PATCH v3 13/18] staging: ccree: remove dead code

2017-06-04 Thread Gilad Ben-Yossef
Remove some unused macro definitions from hash definitions. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/hash_defs.h | 31 +++ 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/drivers/staging/ccree/hash_defs.h b/drivers/staging/ccree

[PATCH v3 14/18] staging: ccree: remove spurious blank line

2017-06-04 Thread Gilad Ben-Yossef
Remove spurious blank line from cc_regs.h Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_regs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ccree/cc_regs.h b/drivers/staging/ccree/cc_regs.h index 53675e3..4a893a6 100644 --- a/drivers/staging/ccree/cc_regs.h

[PATCH v3 10/18] staging: ccree: remove unused struct

2017-06-04 Thread Gilad Ben-Yossef
struct SepHashPrivateContext is not used anywhere in the code. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/hash_defs.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/ccree/hash_defs.h b/drivers/staging/ccree/hash_defs.h index

[PATCH v3 11/18] staging: ccree: use snake_case for hash enums

2017-06-04 Thread Gilad Ben-Yossef
Hash enum were named using CamelCase, move over to snake_case. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 4 ++-- drivers/staging/ccree/hash_defs.h| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree

[PATCH v3 03/18] staging: ccree: remove 48 bit dma addr sim

2017-06-04 Thread Gilad Ben-Yossef
Remove no longer needed code used to simulate 48 bit dma addresses on 32 bit platforms for development purposes. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 19 drivers/staging/ccree/ssi_buffer_mgr.c | 83 - drivers

[PATCH v3 07/18] staging: ccree: remove cycle count debug support

2017-06-04 Thread Gilad Ben-Yossef
The ccree driver had support for rough performance debugging via cycle counting which has bit rotted and can easily be replcaed with perf. Remove it from the driver. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 14 drivers/staging/ccree/ssi_aead.c

[PATCH] crypto: testmgr: use consistent format for errors

2017-06-04 Thread Gilad Ben-Yossef
Fix inconsistent format and spelling in hash tests error messages. Signed-off-by: Gilad Ben-Yossef --- crypto/testmgr.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 6f5f3ed..8c68c99 100644 --- a/crypto/testmgr.c

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

2017-08-05 Thread Gilad Ben-Yossef
that case, 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 Drin

[PATCH v2 3/6] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-30 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 | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH v2 1/6] staging: ccree: fix split strings

2017-07-30 Thread Gilad Ben-Yossef
Fix strings in log messages being split across lines and the resulting alignment issues when being fixed. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 9 ++-- drivers/staging/ccree/ssi_buffer_mgr.c | 86 ++--- drivers/staging/ccree

[PATCH v2 0/6] ccree style fixes and simplification

2017-07-30 Thread Gilad Ben-Yossef
0d0d4d21a09981e65b2bd386c999e8c0ecc6444e) as well as staging-testing and of course compiles and runs. If this doesn't apply cleanly I'm going to start suspecting Gremlins at out IT dept. Gilad Ben-Yossef (3): staging: ccree: fix split strings staging: ccree: kmalloc by sizeof va

[PATCH v2 5/6] staging: ccree: Use platform_get_irq and devm_request_irq

2017-07-30 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

[PATCH v2 6/6] staging: ccree: simplify resource release on error

2017-07-30 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 v2 4/6] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-30 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 v2 2/6] staging: ccree: kmalloc by sizeof var not type

2017-07-30 Thread Gilad Ben-Yossef
Change places where we alloc memory by sizeof type to sizeof var. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging/ccree/ssi_hash.c| 4

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

2017-07-30 Thread Gilad Ben-Yossef
On Thu, Jul 27, 2017 at 10:48 PM, Dan Carpenter wrote: > On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote: >> + new_drvdata->cc_base = devm_ioremap_resource(&plat_dev->dev, >> + req_mem_cc_regs); >&g

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

2017-07-30 Thread Gilad Ben-Yossef
est-buffer: " > "digest_buff_dma_addr=%pad\n", > - ctx->digest_buff_dma_addr); > + &ctx->digest_buff_dma_addr); > ctx->digest_buff_dma_addr = 0; > }

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

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

Re: [PATCH] crypto: caam - properly set IV after {en,de}crypt

2017-08-14 Thread Gilad Ben-Yossef
ng this thread from the dead, but doesn't the patch fail for in-place decryption since we are copying from req->dst after the operation is done, and therefore it no longer contains the ciphertext? I'm asking since I ran into a similar issue in the ccree driver and thought to deploy a sim

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

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

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

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

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

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

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

<    3   4   5   6   7   8   9   10   >