Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2017-01-03 Thread Gilad Ben-Yossef
and tcw. > Good idea. I wanted to test the patch but alas it does not apply cleanly. You seem to have a blank line at the end of files and other small transgressions that makes checkpatch grumpy. Also... > > Not-signed-off-by: Binoy Jayan What is Not-signed-off-by ? :-) Thanks, Gil

Is the asynchronous hash crypto API asynchronous?

2017-01-08 Thread Gilad Ben-Yossef
ahash_digest would be -EINPROGRESS, which is actually as expected for an asynchronous except that will not work with the code example in api-intro.rst. So... I am totally confused. The documentation claims this is an asynchronous interface, but then its own code examples beg to differ and actual

Re: Is the asynchronous hash crypto API asynchronous?

2017-01-09 Thread Gilad Ben-Yossef
en to me. I would be very happy to offer to fix the broken call sites, if you can only confirm my understanding that indeed cases which register a NULL callback are broken and it is not just a misunderstanding on my part. Many thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take

Re: [RFC PATCH v3] crypto: Add IV generation algorithms

2017-01-18 Thread Gilad Ben-Yossef
eq->sg_out, Also, where do the scatterlist src2 and dst2 that you use sg_set_page() get sg_init_table() called on? I couldn't figure it out... Last but not least, when performing the following sequence on Arm64 (on latest Qemu Virt platform) - 1. cryptsetup luksFormat fs3.img 2. cryptsetu

Re: [RFC PATCH v3] crypto: Add IV generation algorithms

2017-01-19 Thread Gilad Ben-Yossef
On Thu, Jan 19, 2017 at 6:42 AM, Binoy Jayan wrote: > Hi Gilad, > > On 18 January 2017 at 20:51, Gilad Ben-Yossef wrote: >> I have some review comments and a bug report - > > Thank you very much for testing this on ARM and for the comments. My pleasure. Thanks

[PATCH] dm: switch dm-verity to async hash crypto API

2017-01-24 Thread Gilad Ben-Yossef
real0m 33.96s user0m 1.10s sys 0m 8.00s All measurements done on a dual core Zynq ZC706 development board with an Armv7 processors. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-verity-fec.c| 4 +- drivers/md/dm-verity-target.c | 230

Re: [PATCH] dm: switch dm-verity to async hash crypto API

2017-01-28 Thread Gilad Ben-Yossef
Hi Odrej, On Thu, Jan 26, 2017 at 1:34 PM, Ondrej Mosnáček wrote: > Hi Gilad, > > 2017-01-24 15:38 GMT+01:00 Gilad Ben-Yossef : >> - v->tfm = crypto_alloc_shash(v->alg_name, 0, 0); >> + v->tfm = crypto_alloc_ahash(v->alg_name, 0, CRYPTO_ALG_ASYNC); &

[PATCH v2] dm: switch dm-verity to async hash crypto API

2017-02-06 Thread Gilad Ben-Yossef
time when a lot of concurrent file accesses are made to the protected volume. Move DM_VERITY to the asynchronous hash API. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers CC: Ondrej Mosnáček --- The patch was tested on an Armv7 based dual core Zynq ZC706 development board with SHA256-asm, SHA256

Re: [PATCH] dm: switch dm-verity to async hash crypto API

2017-02-06 Thread Gilad Ben-Yossef
multiple outstanding async requests is a great idea. I will look into supporting it. 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

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-02-07 Thread Gilad Ben-Yossef
to: Add IV generation algorithms > > drivers/md/dm-crypt.c | 1894 > ++-- > include/crypto/geniv.h | 47 ++ > 2 files changed, 1402 insertions(+), 539 deletions(-) > create mode 100644 include/crypto/geniv.h Ran Bonnie++ on it last night (Luks mode, plain64, Qemu Virt pl

[PATCH] crypto: fix typo in doc

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

Re: [PATCH v2] dm: switch dm-verity to async hash crypto API

2017-02-17 Thread Gilad Ben-Yossef
Hi Milan, Thank you for the review and testing. On Fri, Feb 17, 2017 at 3:00 PM, Milan Broz wrote: > On 02/06/2017 02:58 PM, Gilad Ben-Yossef wrote: >> Use of the synchronous digest API limits dm-verity to using pure >> CPU based algorithm providers and rules out the use of off C

Re: [PATCH v2] dm: switch dm-verity to async hash crypto API

2017-02-19 Thread Gilad Ben-Yossef
On Fri, Feb 17, 2017 at 4:47 PM, Gilad Ben-Yossef wrote: > Hi Milan, > > Thank you for the review and testing. > > On Fri, Feb 17, 2017 at 3:00 PM, Milan Broz wrote: >> >> On 02/06/2017 02:58 PM, Gilad Ben-Yossef wrote: >> > Use of the synchronous diges

[PATCH v3] dm: switch dm-verity to async hash crypto API

2017-02-19 Thread Gilad Ben-Yossef
time when a lot of concurrent file accesses are made to the protected volume. Move DM_VERITY to the asynchronous hash API. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers CC: Ondrej Mosnáček CC: Milan Broz --- The patch was tested on an Armv7 based dual core Zynq ZC706 development board with

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-03-01 Thread Gilad Ben-Yossef
was born to fix predictive IVs (CBC > watermarking > attacks) for disk encryption only, no reason to expose it outside of disk > encryption. > The point is that you have more than one implementation of these "compatible crap" - the software implementation that you wrote and po

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-03-01 Thread Gilad Ben-Yossef
On Wed, Mar 1, 2017 at 11:29 AM, Milan Broz wrote: > > On 03/01/2017 09:30 AM, Gilad Ben-Yossef wrote: > > On Tue, Feb 28, 2017 at 11:05 PM, Milan Broz wrote: > >> > >> On 02/22/2017 07:12 AM, Binoy Jayan wrote: > >>> > >>> I was wondering

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-03-02 Thread Gilad Ben-Yossef
On Wed, Mar 1, 2017 at 3:21 PM, Ondrej Mosnacek wrote: > 2017-03-01 13:42 GMT+01:00 Gilad Ben-Yossef : > > Wouldn't adopting a bulk request API (something like what I tried to > do here [1]) that allows users to supply multiple messages, each with > their own IV, fulfill th

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-03-06 Thread Gilad Ben-Yossef
On Wed, Mar 1, 2017 at 5:38 PM, Milan Broz wrote: > > On 03/01/2017 02:04 PM, Milan Broz wrote: >> On 03/01/2017 01:42 PM, Gilad Ben-Yossef wrote: >> ... >> >>> I can certainly understand if you don't wont to take the patch until >>> we have resu

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

2017-07-27 Thread Gilad Ben-Yossef
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

[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 --- drivers/staging/ccree/ssi_aead.c | 4 ++-- drivers/staging/ccree/ssi_cipher.c | 14 +++--- drivers/staging/ccree

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

[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 --- drivers/staging/ccree/ssi_aead.c| 9 ++-- drivers/staging/ccree/ssi_buffer_mgr.c | 86 ++--- drivers/staging/ccree

[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 --- drivers/staging/ccree/ssi_aead.c| 46 + drivers/staging/ccree/ssi_buffer_mgr.c | 30 ++- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_hash.c

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

2017-07-27 Thread Gilad Ben-Yossef
tyle 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 robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru

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

2017-07-27 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 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-27 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 3/3] staging: ccree: Use platform_get_irq and devm_request_irq

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

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

2017-07-27 Thread Gilad Ben-Yossef
170719. > No build issues reported. Patch applies against staging-next + latest changes and it builds and runs. Acked-by: Gilad Ben-Yossef Gilad

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

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

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] ccree: Removed a sparse warning in ssi_fips.h

2017-07-30 Thread Gilad Ben-Yossef
27;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 to find out which if you are unsure. Tha

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; > }

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

2017-08-01 Thread Gilad Ben-Yossef
the symbols > static inline, to remove the warnings. > > Signed-off-by: RishabhHardas Acked-by: Gilad Ben-Yossef 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

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

2017-08-08 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(+), 33 deletions(-) diff

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

2017-08-08 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(+), 59 deletions(-) diff --git

[PATCH v4 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 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 08/19] crypto: move drbg to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
the completion of the request any way. Signed-off-by: Gilad Ben-Yossef --- crypto/drbg.c | 36 +--- include/crypto/drbg.h | 3 +-- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/crypto/drbg.c b/crypto/drbg.c index 633a88e..c522251 100644

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

2017-08-08 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef --- crypto/testmgr.c | 204

[PATCH v4 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 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 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 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 03/19] crypto: remove redundant backlog checks on EBUSY

2017-08-08 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef --- crypto/ahash.c| 12 +++- crypto/cts.c | 6 ++ crypto/lrw.c

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

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 v8 0/4] crypto: add algif_akcipher user space API

2017-08-13 Thread Gilad Ben-Yossef
ptography, 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 acceptance withstanding of

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

Re: [Freedombox-discuss] Hardware Crypto

2017-08-14 Thread Gilad Ben-Yossef
rely > 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-or-nothing; if there is a hardware RNG can one > use that without loading the rest of the code for the crypto > accelerator? The choice is modular. 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 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 19/19] crypto: adapt api sample to use async. op wait

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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

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

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

2017-08-14 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_hash.c | 30

[PATCH 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 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 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 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 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 v3 00/22] staging: ccree: fixes and simplifications

2017-08-14 Thread Gilad Ben-Yossef
t;) Gilad Ben-Yossef (18): staging: ccree: fix split strings staging: ccree: kmalloc by sizeof var not type staging: ccree: simplify resource release on error staging: ccree: remove unused completion staging: ccree: remove m32r as supported platform staging: ccree: rewrite GET_DMA_BUFF

[PATCH v3 21/22] staging: ccree: save ciphertext for CTS IV

2017-08-14 Thread Gilad Ben-Yossef
The crypto API requires saving the last blocks of ciphertext in req->info for use as IV for CTS mode. The ccree driver was not doing it and so failing tcrypt tests in some situations. This patch fixes the issue. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c |

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

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

[PATCH v3 19/22] staging: ccree: fix code indent

2017-08-14 Thread Gilad Ben-Yossef
Fix multiple code indentation issues. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 23 --- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_sysfs.c | 4 +++- 3 files changed, 16 insertions(+), 13 deletions

[PATCH v3 20/22] staging: ccree: replace noop macro with inline

2017-08-14 Thread Gilad Ben-Yossef
Replace noop macro with a noop inline function Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 0b9c7e6..063a1cc 100644

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

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

[PATCH v3 17/22] staging: ccree: clean up comments

2017-08-14 Thread Gilad Ben-Yossef
Clean up comments: fix style, trim long lines and remove useless ones. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 40 + drivers/staging/ccree/ssi_aead.h| 47 ++--- drivers/staging/ccree/ssi_buffer_mgr.c

[PATCH v3 16/22] staging: ccree: fix spelling mistakes

2017-08-14 Thread Gilad Ben-Yossef
Fix various spelling mistakes in comments. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_hash.c| 2 +- drivers/staging/ccree/ssi_hash.h| 2 +- drivers/staging/ccree/ssi_ivgen.c | 2 +- drivers/staging/ccree

[PATCH v3 15/22] staging: ccree: fix line indentation and breaks

2017-08-14 Thread Gilad Ben-Yossef
Fix source line indentation and breaks in ssi_aead.c Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 1024 -- 1 file changed, 532 insertions(+), 492 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree

[PATCH v3 14/22] staging: ccree: fix struct init braces

2017-08-14 Thread Gilad Ben-Yossef
Put struct init braces on line of it's own. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c

[PATCH v3 13/22] staging: ccree: fix line indentation and breaks

2017-08-14 Thread Gilad Ben-Yossef
Fix source line indentation and breaks Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 494 ++- 1 file changed, 284 insertions(+), 210 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index

[PATCH v3 11/22] staging: ccree: fix line indentation and breaks

2017-08-14 Thread Gilad Ben-Yossef
Fix wrong indentation and line breaks, including missing tabs, breaking lines longer then 80 char or wrongly broken. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 107 +++-- 1 file changed, 67 insertions(+), 40 deletions(-) diff --git

[PATCH v3 12/22] staging: ccree: align box comment correctly

2017-08-14 Thread Gilad Ben-Yossef
Fix indentation in first comment. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index b7d6586..b95c3ce

[PATCH v3 10/22] staging: ccree: rewrite GET_DMA_BUFFER_TYPE as func

2017-08-14 Thread Gilad Ben-Yossef
The GET_DMA_BUFFER_TYPE macro was triggering a macro argument reuse warning from checkpatch. Rewrite the macro as inline function instead to avoid risk of unintended side effects. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 26 +- drivers

[PATCH v3 07/22] staging: ccree: remove unused completion

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

  1   2   3   4   5   6   7   8   9   10   >