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

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

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

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

2017-08-14 Thread Gilad Ben-Yossef
to the async op finishing. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- 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-targ

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

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

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

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

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

2017-08-14 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(

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

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

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

2017-08-14 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef <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 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 transient busy r

Re: [Freedombox-discuss] Hardware Crypto

2017-08-14 Thread Gilad Ben-Yossef
code is rarely > a good idea. Such tests at development time seem like a fine idea, > though; do we have those already? > > What about testing when it is time to decide on kernel configuration; > include a particular module or not? Another issue is whether the > module choice is all

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

2017-08-14 Thread Gilad Ben-Yossef
appropriate for -stable) and later, if needed, offload IV updating in HW. > My apologies for reviving 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 cipherte

Re: [PATCH v8 0/4] crypto: add algif_akcipher user space API

2017-08-13 Thread Gilad Ben-Yossef
metric cryptography, I would like to point out that there is both interest and HW support for private symmetric key operations as well, for example for storage encryption via DM-Crypt and fscrypt, so I do hope (and will work on) adding some sort of HW key support the crypto API, community accep

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 <gary.h...@amd.com> 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-Y

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 <smuel...@chronox.de> 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 cod

[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 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 <gi...@benyossef.com> --- crypto

[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 <gi...@benyossef.com> --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/crypto/ccp/ccp-dev.c | 7 +-- 2 files changed, 8 insertions

[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 <gi...@benyossef.com> --- crypto/ahash.c| 12 +++- crypto/cts.c

[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 <gi...@benyossef.com> --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell/

[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 <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> --- crypto/api.c | 13 + include/linux/crypto.h | 41 + 2 files changed, 54 insertions(+) diff --git a/crypto/ap

[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 <gi...@benyossef.com> --- crypto/asymmetric_keys/public_key.c | 28 1 file changed, 4 inse

[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 <gi...@benyossef.com> --- fs/crypto/crypto.c | 28 fs/crypto/fname.c

[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 <gi...@benyossef.com> --- crypto/testmgr.c

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

[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 <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 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 <gi...@benyossef.com> --- 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-targ

[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 <gi...@benyossef.com> Acked-by: Pavel Shilovsky <pshi...@microsoft.com> --- fs/cifs/smb2ops.c | 30 -- 1 fil

[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 <gi...@benyossef.com> --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(

[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 <gi...@benyossef.com> --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(

[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 <gi...@benyossef.com> --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 del

[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 <gi...@benyossef.com> --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(

[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 <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 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 <gi...@benyossef.com> Acked-by: Mimi Zohar <zo...@linux.vnet.ibm.com> --- security/integrity/ima/ima_c

[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 <gi...@benyossef.com> --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_

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

2017-08-06 Thread Gilad Ben-Yossef
this cast? In 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

Re: [PATCH] staging/ccree: Declare compiled out fuctions static inline

2017-08-01 Thread Gilad Ben-Yossef
be made static. This patch makes both > the symbols > static inline, to remove the warnings. > > Signed-off-by: RishabhHardas <rishabhhar...@gmail.com> Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If

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

2017-07-31 Thread Gilad Ben-Yossef
if (ctx->opad_tmp_keys_dma_addr != 0) { > @@ -1300,7 +1300,7 @@ static void ssi_hash_free_ctx(struct ssi_hash_ctx *ctx) > DMA_BIDIRECTIONAL); > SSI_LOG_DEBUG("Unmapped opad-digest: " > "opad_tmp_keys_dma_addr=%pad\n", > - ctx->opad_tmp_keys_dma_addr); > + >opad_tmp_keys_dma_addr); > ctx->opad_tmp_keys_dma_addr = 0; > } > > @@ -1321,7 +1321,7 @@ static int ssi_hash_alloc_ctx(struct ssi_hash_ctx *ctx) > } > SSI_LOG_DEBUG("Mapped digest %zu B at va=%pK to dma=%pad\n", > sizeof(ctx->digest_buff), ctx->digest_buff, > - ctx->digest_buff_dma_addr); > + >digest_buff_dma_addr); > > ctx->opad_tmp_keys_dma_addr = dma_map_single(dev, (void > *)ctx->opad_tmp_keys_buff, sizeof(ctx->opad_tmp_keys_buff), > DMA_BIDIRECTIONAL); > if (dma_mapping_error(dev, ctx->opad_tmp_keys_dma_addr)) { > @@ -1332,7 +1332,7 @@ static int ssi_hash_alloc_ctx(struct ssi_hash_ctx *ctx) > } > SSI_LOG_DEBUG("Mapped opad_tmp_keys %zu B at va=%pK to dma=%pad\n", > sizeof(ctx->opad_tmp_keys_buff), ctx->opad_tmp_keys_buff, > - ctx->opad_tmp_keys_dma_addr); > + >opad_tmp_keys_dma_addr); > > ctx->is_hmac = false; > return 0; > diff --git a/drivers/staging/ccree/ssi_request_mgr.c > b/drivers/staging/ccree/ssi_request_mgr.c > index 3f39150cda4f..5ee1c07f69de 100644 > --- a/drivers/staging/ccree/ssi_request_mgr.c > +++ b/drivers/staging/ccree/ssi_request_mgr.c > @@ -324,9 +324,9 @@ int send_request( > if (ssi_req->ivgen_dma_addr_len > 0) { > SSI_LOG_DEBUG("Acquire IV from pool into %d DMA addresses > %pad, %pad, %pad, IV-size=%u\n", > ssi_req->ivgen_dma_addr_len, > - ssi_req->ivgen_dma_addr[0], > - ssi_req->ivgen_dma_addr[1], > - ssi_req->ivgen_dma_addr[2], > + _req->ivgen_dma_addr[0], > + _req->ivgen_dma_addr[1], > + _req->ivgen_dma_addr[2], > ssi_req->ivgen_size); > > /* Acquire IV from pool */ > -- > 2.10.0.rc2.1.g053435c > -- 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] ccree: Removed a sparse warning in ssi_fips.h

2017-07-30 Thread Gilad Ben-Yossef
d be "static inline". While you're at it you can also apply it to the fips_handler() function below. Also, please use a descriptive title, maybe: "declare compiled out func static inline" Last, please CC ALL the appropriate mailing lists. Use the kernel get_maintainer script t

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 <dan.carpen...@oracle.com> wrote: > On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote: >> + new_drvdata->cc_base = devm_ioremap_resource(_dev->dev, >> +

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

2017-07-30 Thread Gilad Ben-Yossef
zalloc() is automatically freed on driver detach, otherwise it leads to a double free. (c) remove unnecessary blank lines. Signed-off-by: Suniel Mahesh <suni...@techveda.org> [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> --- dri

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

2017-07-30 Thread Gilad Ben-Yossef
stered variable from driver probe 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 <suni...@techveda.org> Acked-by: Gilad Ben-Yossef <gi..

[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 <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging

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

2017-07-30 Thread Gilad Ben-Yossef
Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 3 +- drivers/staging/ccree/ssi_cipher.c | 3 +- drivers/staging/ccree/ssi_driver.c | 102 - drivers/staging/ccree/ssi_hash.c | 3 +- 4 files changed, 59 inser

[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 var not type

[PATCH v2 4/6] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-30 Thread Gilad Ben-Yossef
source() releases and unmaps mem region on driver detach. (d) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh <suni...@techveda.org> [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> --- dri

Re: [PATCH] staging: ccree: Fix unnecessary NULL check before kfree'ing it

2017-07-27 Thread Gilad Ben-Yossef
> --- > Note: > - Patch was compile tested and built(ARCH=arm) on next-20170719. > No build issues reported. Patch applies against staging-next + latest changes and it builds and runs. Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> Gilad

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

2017-07-27 Thread Gilad Ben-Yossef
stered variable from driver probe 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 <suni...@techveda.org> Acked-by: Gilad Ben-Yossef <gi..

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

2017-07-27 Thread Gilad Ben-Yossef
zalloc() is automatically freed on driver detach, otherwise it leads to a double free. (c) remove unnecessary blank lines. Signed-off-by: Suniel Mahesh <suni...@techveda.org> [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> --- dri

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

2017-07-27 Thread Gilad Ben-Yossef
fied the patch set on CrytoCell HW and it's fine. Unfortunately, my coding style fixes patch set made two of these to fail to apply. Following up is a rebased patch. There are no changes except resolving conflicts. -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale

[PATCH 1/4] staging: ccree: fix parenthesis alignment

2017-07-27 Thread Gilad Ben-Yossef
Fix various remaining parenthesis alignment issues. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 46 + drivers/staging/ccree/ssi_buffer_mgr.c | 30 ++- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/s

[PATCH 2/4] staging: ccree: fix split strings

2017-07-27 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 <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 9 ++-- drivers/staging/ccree/ssi_buffer_mgr.c

[PATCH 4/4] staging: ccree: kmalloc by sizeof var not type

2017-07-27 Thread Gilad Ben-Yossef
Change places where we alloc memory by sizeof type to sizeof var. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging

[PATCH 3/4] staging: ccree: remove func name from log messages

2017-07-27 Thread Gilad Ben-Yossef
The SSI_LOG macros already add __func__ to log messages, so remove log message that add them a second time in the log message itself. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 4 ++-- drivers/staging/ccree/ssi_cipher.

[PATCH 0/4] staging: ccree: coding style clean ups

2017-07-27 Thread Gilad Ben-Yossef
for fixes for later changes. I hope these will be good. Gilad Ben-Yossef (4): staging: ccree: fix parenthesis alignment staging: ccree: fix split strings staging: ccree: remove func name from log messages staging: ccree: kmalloc by sizeof var not type drivers/staging/ccree/ssi_aead.c

Re: [PATCH 00/12] staging: ccree: coding style fixes

2017-07-14 Thread Gilad Ben-Yossef
On Fri, Jul 14, 2017 at 2:39 PM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Thu, Jul 13, 2017 at 11:19:50AM +0300, Gilad Ben-Yossef wrote: >> Another batch of ccree coding style fixes. >> >> These goes on top of commit a8c4ae12 ("stag

[PATCH 02/12] staging: ccree: clean up struct ssi_aead_ctx

2017-07-13 Thread Gilad Ben-Yossef
and properly matching alignment, Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 108 +++ 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_

[PATCH 08/12] staging: ccree: avoid constant comparison

2017-07-13 Thread Gilad Ben-Yossef
Re-write predicate to avoid constant comparison. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index d

[PATCH 06/12] staging: ccree: CamelCase to snake_case in func vars

2017-07-13 Thread Gilad Ben-Yossef
Turn local vars and function parameters names in CamelCase to snake_case. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 26 +- drivers/staging/ccree/ssi_buffer_mgr.c | 15 --- drivers/staging

[PATCH 04/12] staging: ccree: fix parenthesis alignment

2017-07-13 Thread Gilad Ben-Yossef
Fix various remaining parenthesis alignment issues. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 46 + drivers/staging/ccree/ssi_buffer_mgr.c | 30 ++- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/s

[PATCH 07/12] staging: ccree: CamelCase to snake_case in aead struct

2017-07-13 Thread Gilad Ben-Yossef
Rename aead_req_struct fields from CamelCase to snake_case. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 26 ++-- drivers/staging/ccree/ssi_aead.h | 12 +++--- drivers/staging/ccree/ssi_buffer_mgr.

[PATCH 03/12] staging: ccree: use proper printk format for dma_addr_t

2017-07-13 Thread Gilad Ben-Yossef
Fix needless casting to unsigned long long in printk for DMA addresses by using proper %pad format. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 16 drivers/staging/ccree/ssi_buffer_mgr.c | 48 d

[PATCH 05/12] staging: ccree: fix split strings

2017-07-13 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 <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 9 ++-- drivers/staging/ccree/ssi_buffer_mgr.c

[PATCH 09/12] staging: ccree: avoid unnecessary line continuation

2017-07-13 Thread Gilad Ben-Yossef
Avoid unnecessary line continuation in log function call. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c

[PATCH 12/12] staging: ccree: remove whitespace before a quoted newline

2017-07-13 Thread Gilad Ben-Yossef
Remove unnecessary whitespace before a quoted newline in strings. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_cipher.c | 6 +++--- drivers/staging/ccree/ssi_hash.c | 2 +- drivers/staging/ccree/ssi_sysfs.c | 10 +- 3 files chan

[PATCH 10/12] staging: ccree: remove func name from log messages

2017-07-13 Thread Gilad Ben-Yossef
The SSI_LOG macros already add __func__ to log messages, so remove log message that add them a second time in the log message itself. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c | 4 ++-- drivers/staging/ccree/ssi_cipher.

[PATCH 11/12] staging: ccree: kmalloc by sizeof var not type

2017-07-13 Thread Gilad Ben-Yossef
Change places where we alloc memory by sizeof type to sizeof var. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging

[PATCH 01/12] staging: ccree remove unnecessary parentheses

2017-07-13 Thread Gilad Ben-Yossef
Remove unnecessary parentheses from ccree driver code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_buffer_mgr.c | 8 drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging

[PATCH 00/12] staging: ccree: coding style fixes

2017-07-13 Thread Gilad Ben-Yossef
Another batch of ccree coding style fixes. These goes on top of commit a8c4ae12 ("staging: ccree: Fix alignment issues in ssi_sysfs.c") in staging-testing. Gilad Ben-Yossef (12): staging: ccree remove unnecessary parentheses staging: ccree: clean up struct ssi_aead_ctx staging:

[PATCH] staging: ccree: move FIPS support to kernel infrastructure

2017-07-11 Thread Gilad Ben-Yossef
reported FIPS errors according to the kernel policy of inducing a panic in such an event. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Note: this patch is based on top of Tyler Olivieri patch entitled "staging: ccree: fix switch case indentation". drivers/stagi

Re: [PATCH 1/2] staging: ccree: remove unnecessary cast on kmalloc

2017-07-11 Thread Gilad Ben-Yossef
> @@ > expression * e; > expression arg1, arg2; > type T; > @@ > > - e=(T*) > + e= > kmalloc(arg1, arg2); > > Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> For both patches: Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> > --- &

Re: [PATCH 0/5] staging: ccree: fix checkpatch errors

2017-07-11 Thread Gilad Ben-Yossef
Tyler, On Tue, Jul 11, 2017 at 4:38 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: > On Mon, Jul 10, 2017 at 12:10 AM, <sleepingzucch...@gmail.com> wrote: >> From: Tyler Olivieri <sleepingzucch...@gmail.com> >> >> This patchset fixes several checkpatc

Re: [PATCH v2] staging: ccree: Use __func__ instead of function name

2017-07-11 Thread Gilad Ben-Yossef
> the function's name, in a string > > It is prefered to use '%s & __func__' instead of function > name for logging. > > Signed-off-by: Karthik Tummala <kart...@techveda.org> > --- > Changes for v2: > v1 was a patch series, which consisted of two patches in w

Re: [PATCH 0/5] staging: ccree: fix checkpatch errors

2017-07-11 Thread Gilad Ben-Yossef
staging/ccree/ssi_fips.c | 2 - > drivers/staging/ccree/ssi_fips_ll.c| 85 > +++--- > drivers/staging/ccree/ssi_hash.c | 33 +++-- > drivers/staging/ccree/ssi_sysfs.c | 3 +- > 7 files changed, 57 insertions(+), 91 deletions(-) > > -- >

Re: [PATCH] Stagingdriver cctree: Fix for checkpatch warning

2017-07-11 Thread Gilad Ben-Yossef
queue */ > +#define HW_QUEUE_SLOTS_MAX 15 > > #define CC_REG_NAME(word, name) DX_DSCRPTR_QUEUE_WORD ## word ## _ ## name > > -- > 1.8.3.1 > -- 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 00/10] Fix alignment issues in staging/ccree

2017-07-11 Thread Gilad Ben-Yossef
On Mon, Jul 3, 2017 at 3:28 PM, Simon Sandström <si...@nikanor.nu> wrote: > On Mon, Jul 03, 2017 at 10:19:31AM +0300, Gilad Ben-Yossef wrote: >> but for the few cases where its a complex expression that can be >> broken down like this one: >> >> WARNING: lin

Re: HELP writing crypto driver for HW with blocksize hash

2017-07-11 Thread Gilad Ben-Yossef
On Tue, Jul 11, 2017 at 1:50 PM, Kamil Konieczny <k.koniec...@partner.samsung.com> wrote: > On 11.07.2017 12:30, Gilad Ben-Yossef wrote: >> On Tue, Jul 11, 2017 at 10:52 AM, Kamil Konieczny >> <k.koniec...@partner.samsung.com> wrote: >>> >>> >>&g

Re: HELP writing crypto driver for HW with blocksize hash

2017-07-11 Thread Gilad Ben-Yossef
gt; Your two constraints are actually inter-related - If you can only feed the HW a constant size chunk, than indeed need to keey bytes fed to the driver the are below the chunk size in a software buffer, but than you need the final() method to feed these bytes (padded as needed) to the HW if th

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

2017-07-03 Thread Gilad Ben-Yossef
On Mon, Jul 3, 2017 at 3:35 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Sun, Jul 02, 2017 at 05:41:43PM +0300, Gilad Ben-Yossef wrote: >> The crypto API was using the -EBUSY return value to indicate >> both a hard failure to submit a crypto operation into a >&

Re: [PATCH 00/10] Fix alignment issues in staging/ccree

2017-07-03 Thread Gilad Ben-Yossef
ee/ssi_hash.c| 116 +++-- > drivers/staging/ccree/ssi_ivgen.c | 3 +- > drivers/staging/ccree/ssi_request_mgr.c | 42 +++-- > drivers/staging/ccree/ssi_sram_mgr.c| 6 +- > drivers/staging/ccree/ssi_sysfs.c | 59 --- > 10 files changed, 37

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

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

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

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

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

2017-07-02 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto

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

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

[PATCH v3 27/28] crypto: mediatek: move to generic async completion

2017-07-02 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(

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

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

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

2017-07-02 Thread Gilad Ben-Yossef
to the async op finishing. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- 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-targ

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

2017-07-02 Thread Gilad Ben-Yossef
prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef <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 v3 26/28] crypto: qce: move to generic async completion

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

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

2017-07-02 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/talitos.c | 39 +-- 1 file changed, 5 insertions(

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

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

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

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

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

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

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

2017-07-02 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/testmgr.c

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

2017-07-02 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 14 +++--- crypto/algif_

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

2017-07-02 Thread Gilad Ben-Yossef
for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Stephan Muller <smuel...@chronox.de> --- crypto/drbg.c | 36 +--- include/crypto/drbg.h | 3 +-- 2 files changed, 10 insertions(+), 29 deleti

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

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

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

2017-07-02 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2 files changed, 53 insertions(+) diff --git a/crypto/ap

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

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

<    1   2   3   4   5   6   7   8   9   >