Re: [dm-devel] [PATCH v3 0/4] crypto: switch to crypto API for EBOIV generation

2020-12-02 Thread Gilad Ben-Yossef
Hi, On Thu, Oct 29, 2020 at 12:05 PM Gilad Ben-Yossef wrote: > > > This series creates an EBOIV template that produces a skcipher > transform which passes through all operations to the skcipher, while > using the same skcipher and key to encrypt the input IV, which is > assu

Re: [dm-devel] [PATCH v3 1/4] crypto: add eboiv as a crypto API template

2020-10-30 Thread Gilad Ben-Yossef
Hi, On Fri, Oct 30, 2020 at 12:33 PM Milan Broz wrote: > > On 29/10/2020 11:05, Gilad Ben-Yossef wrote: > > > > +config CRYPTO_EBOIV > > + tristate "EBOIV support for block encryption" > > + default DM_CRYPT > > + select CRYPTO_CBC &g

[dm-devel] [PATCH v3 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-30 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279

[dm-devel] [PATCH v3 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-30 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") ---

[dm-devel] [PATCH v3 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-30 Thread Gilad Ben-Yossef
-crypt test suite and on an arm 32 bit board with the CryptoCell hardware. Since no offical source for eboiv test vectors is known, the test vectors supplied as patch #2 are derived from sectors which are part of the dm-crypt test suite. Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers Cc: Milan Broz

[dm-devel] [PATCH v3 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-30 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-crypt.c | 61 ++- 1

[dm-devel] [PATCH v3 1/4] crypto: add eboiv as a crypto API template

2020-10-30 Thread Gilad Ben-Yossef
in 5.6. This patch re-implements eboiv as a generic crypto API template, thus allowing use of a alternative architecture specific optimzied implementations (as well as saving a memory allocation along the way). Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers --- crypto/Kconfig | 23 + crypto

[dm-devel] [PATCH v2 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-29 Thread Gilad Ben-Yossef
test suite and on an arm 32 bit board with the CryptoCell hardware. Since no offical source for eboiv test vectors is known, the test vectors supplied as patch #2 are derived from sectors which are part of the dm-crypt test suite. Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers Cc: Milan Broz

[dm-devel] [PATCH v2 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-29 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-crypt.c | 61 ++- 1

[dm-devel] [PATCH v2 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-29 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279

[dm-devel] [PATCH v2 1/4] crypto: add eboiv as a crypto API template

2020-10-29 Thread Gilad Ben-Yossef
in 5.6. This patch re-implements eboiv as a generic crypto API template, thus allowing use of a alternative architecture specific optimzied implementations (as well as saving a memory allocation along the way). Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers --- crypto/Kconfig | 23 crypto

[dm-devel] [PATCH v2 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-29 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") ---

Re: [dm-devel] [PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-29 Thread Gilad Ben-Yossef
ems that setting CONFIG_EBOIV default to dm-crypto Kconfig option value does solves the problem, or have I missed something? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom! -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-27 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") ---

Re: [dm-devel] [PATCH 1/4] crypto: add eboiv as a crypto API template

2020-10-27 Thread Gilad Ben-Yossef
iv_instance_ctx *ictx; > struct skcipher_alg *alg; > u32 mask; > int err; ... Thank you very much for the review and assistance. I will send out a revised version. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom! -- dm-devel mailing

Re: [dm-devel] [PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-27 Thread Gilad Ben-Yossef
On Mon, Oct 26, 2020 at 9:04 PM Milan Broz wrote: > > > > On 26/10/2020 19:39, Eric Biggers wrote: > > On Mon, Oct 26, 2020 at 07:29:57PM +0100, Milan Broz wrote: > >> On 26/10/2020 18:52, Eric Biggers wrote: > >>> On Mon, Oct 26, 2020 at 03:04:46PM +0200,

[dm-devel] [PATCH 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-27 Thread Gilad Ben-Yossef
test suite and on an arm 32 bit board with the CryptoCell hardware. Since no offical source for eboiv test vectors is known, the test vectors supplied as patch #2 are derived from sectors which are part of the dm-crypt test suite. Gilad Ben-Yossef (4): crypto: add eboiv as a crypto API template

[dm-devel] [PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-27 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/Kconfig| 1 + drivers/md/dm-crypt.c | 61

[dm-devel] [PATCH 1/4] crypto: add eboiv as a crypto API template

2020-10-27 Thread Gilad Ben-Yossef
in 5.6. This patch re-implements eboiv as a generic crypto API template, thus allowing use of a alternative architecture specific optimzied implementations (as well as saving a memory allocation along the way). Signed-off-by: Gilad Ben-Yossef --- crypto/Kconfig | 21 crypto/Makefile | 1

[dm-devel] [PATCH 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-27 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279

Re: [PATCH v3 0/6] crypto: switch to crypto API for ESSIV generation

2019-06-20 Thread Gilad Ben-Yossef
droid tree. If this makes sense to you perhaps it is a good idea to have the template format be: ,,, Where for now we will only support a sector size of '0' (i.e. do not auto-increment) and later extend or am I over engineering? :-) Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [RFC PATCH 0/3] crypto: switch to shash for ESSIV generation

2019-06-17 Thread Gilad Ben-Yossef
d > code would go away entirely except for changing the string "cbc(aes)" to > "essiv(cbc(aes),sha256,aes)". I will also add that going the skcipher route rather than shash will allow hardware tfm providers like CryptoCell that can do the ESSIV part in hardware implement that

Re: [dm-devel] dm-integrity stalls with iMX6q CAAM

2018-10-17 Thread Gilad Ben-Yossef
ription. > > Historically, there have been several CAAM backlogging implementations > proposed > - but all were rejected: hmmm... obviously the right solution is to implement backlogging but you might want to consider changing the driver to return -ENOSPC or -ENOSYS instead in the m

Re: [dm-devel] (2) FW: RE:(2) FW: RE: FW: (2) FW: Use-after-free while dm-verity

2018-09-03 Thread Gilad Ben-Yossef
On Mon, Sep 3, 2018 at 9:54 AM, 정혜연 wrote: > > Hi Gilad, > > > > I missed test slot because our test milestone is already ended so I have to > wait kernel minor up for applying his patch (aosp common kernel). > > But I tested by myself to print vmalloc in case of is_vmalloc_addr(data) and > dm

Re: [dm-devel] FW: RE:(2) FW: RE: FW: (2) FW: Use-after-free while dm-verity

2018-09-03 Thread Gilad Ben-Yossef
Hi HyeYeon, On Wed, Aug 22, 2018 at 8:28 PM, Mike Snitzer wrote: > > Can you please see if this patch helps? > > https://patchwork.kernel.org/patch/10573051/ > I'm curious if the patch pointed to by Mike resolved your issue :-) Gilad -- Gilad Ben-Yossef Chief Coffee Drink

Re: [dm-devel] FW: RE:(2) FW: RE: FW: (2) FW: Use-after-free while dm-verity

2018-08-21 Thread Gilad Ben-Yossef
Hi, On Mon, Aug 20, 2018 at 2:33 PM, 정혜연 wrote: > > Dear Gilad, > > > > We found memcopy is not preempted as you explained. > > Memcopy make kernel panic at the very first time. > > Your comment was very helpful us to find this. Thank you. > > I'm glad I could help. > > We found the other

Re: [dm-devel] FW: RE: FW: (2) FW: Use-after-free while dm-verity

2018-08-16 Thread Gilad Ben-Yossef
p; walk->offset & alignmask && !err) { > walk->offset = ALIGN(walk->offset, alignmask + 1); > nbytes = min(nbytes, > ((unsigned int)(PAGE_SIZE)) - walk->offset); > walk->entrylen -= nbytes; > > if (nbytes) { >walk->data += walk->o

[dm-devel] Fwd: (2) FW: Use-after-free while dm-verity

2018-08-15 Thread Gilad Ben-Yossef
I missed sending my reply to the list by myself mistake so forwarding. -- Forwarded message -- From: Gilad Ben-Yossef Date: Thu, 16 Aug 2018 09:48:19 +0700 Subject: Re: (2) FW: Use-after-free while dm-verity To: hyeon.ch...@samsung.com On 8/16/18, 정혜연 wrote: > Thank

Re: [dm-devel] FW: Use-after-free while dm-verity

2018-08-15 Thread Gilad Ben-Yossef
erify the area the memcpy is applied to is mapped with kmap_atomic? thanks! Gilad > > commit d1ac3ff008fb9a48f91fc15920b4c8db24c0f03e > Author: Gilad Ben-Yossef > Date: Sun Feb 19 14:46:07 2017 +0200 > > dm verity: switch to using asynchronous hash crypto API > > U

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-22 Thread Gilad Ben-Yossef
e but in an upstream-able, community reviewed and accepted fashion. Of course, breaking it up to stages is fine - it's just that it is hard to show the benefits if you don't do the full monty I hope I've managed to shed some light on the matter and would be happy to supply more details if needed.

Re: [dm-devel] [PATCH 2/2] md: dm-verity: allow parallel processing of bio blocks

2018-03-27 Thread Gilad Ben-Yossef
89f6a2cfec86fba7a115642ff082cb4e9450ea6 > > So I'm particulalry interested to hear from google folks to understand > if they are OK with your proposed verity async crypto API use. If by "scalable async parallel IO" you mean crypto HW than for what it's worth, my experience is that

Re: [dm-devel] [PATCH 2/2] md: dm-verity: allow parallel processing of bio blocks

2018-03-26 Thread Gilad Ben-Yossef
m.com> > --- > drivers/md/dm-verity-fec.c| 10 +- > drivers/md/dm-verity-fec.h| 7 +- > drivers/md/dm-verity-target.c | 215 > +++--- > drivers/md/dm-verity.h| 4 +- > 4 files changed, 173 insertions(+), 63 deletions(-)

Re: [dm-devel] [PATCH 1/2] md: dm-verity: aggregate crypto API calls

2018-03-26 Thread Gilad Ben-Yossef
Chemla <yael.che...@foss.arm.com> > --- > drivers/md/dm-verity-target.c | 220 > -- > 1 file changed, 127 insertions(+), 93 deletions(-) Reviewed-by: Gilad Ben-Yossef <gi...@benyossef.com> -- Gilad Ben-Yossef Chief Co

Re: [dm-devel] Integrity checking fails with Atmel SHA hw accelerator enabled

2018-02-24 Thread Gilad Ben-Yossef
Hi, I'm adding the linux crypto mailing list because it seems relevant. On Fri, Feb 23, 2018 at 2:25 PM, Gigi W <gigitekw...@gmail.com> wrote: > Thanks for the input! > > See below > > > On Fri, Feb 23, 2018 at 10:53 AM Gilad Ben-Yossef <gi...@benyossef.com> >

Re: [dm-devel] Integrity checking fails with Atmel SHA hw accelerator enabled

2018-02-23 Thread Gilad Ben-Yossef
s broken. > > > Any help is appreciated ! > > Thanks in advanced and have a nice day. > > > [1] http://cryptodev-linux.org/documentation.html > [2] https://github.com/nmav/cryptodev-linux/blob/master/examples/sha.c > [3] > https://gist.githubusercontent.com/gmircea/6e1cc029ef5ed7a16b0fe

Re: [dm-devel] [PATCH] md: dm-verity: aggregate crypto API calls

2017-10-25 Thread Gilad Ben-Yossef
nt > blocks. > > Tested on physical Arm 32 and x86_64 and virtual ARM 64. > > Performance numbers were not changed. > > Signed-off-by: Yael Chemla <yael.che...@foss.arm.com> Reviewed-By: Gilad Ben-Yossef <gi...@benyossef.com> > --- > drivers/md/dm-verity-target.c

[dm-devel] [PATCH v10 20/20] crypto: adapt api sample to use async. op wait

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

[dm-devel] [PATCH v10 19/20] crypto: mediatek: move to generic async completion

2017-10-18 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Ryder Lee <ryder@mediatek.com> --- drivers/crypto/mediatek/mt

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

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

[dm-devel] [PATCH v10 18/20] crypto: qce: move to generic async completion

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

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

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

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

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

[dm-devel] [PATCH v10 14/20] cifs: move to generic async completion

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

[dm-devel] [PATCH v10 12/20] fscrypt: move to generic async completion

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

[dm-devel] [PATCH v10 11/20] crypto: move testmgr to generic async completion

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

[dm-devel] [PATCH v10 13/20] dm: move dm-verity to generic async completion

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

[dm-devel] [PATCH v10 07/20] crypto: move algif to generic async completion

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

[dm-devel] [PATCH v10 09/20] crypto: move drbg to generic async completion

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

[dm-devel] [PATCH v10 10/20] crypto: move gcm to generic async completion

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

[dm-devel] [PATCH v10 03/20] net: use -ENOSPC for transient busy indication

2017-10-18 Thread Gilad Ben-Yossef
Replace -EBUSY with -ENOSPC when handling transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Please squash this patch with the previous one when merging upstream. net/ipv4/ah4.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv6/ah6.

[dm-devel] [PATCH v10 04/20] crypto: remove redundant backlog checks on EBUSY

2017-10-18 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/ahash.c| 12 +++- crypto/cts.c

[dm-devel] [PATCH v10 06/20] crypto: introduce crypto wait for async op

2017-10-18 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> CC: Jonathan Cameron <jonathan.came...@huawei.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2

[dm-devel] [PATCH v10 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-10-18 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-elec

[dm-devel] [PATCH v10 02/20] crypto: ccp: use -ENOSPC for transient busy indication

2017-10-18 Thread Gilad Ben-Yossef
Replace -EBUSY with -ENOSPC when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Reviewed-by: Gary R Hook <gary.h...@amd.com> --- Please squash this patch with the previous one when merging upstream. drivers/cr

[dm-devel] [PATCH v10 01/20] crypto: change transient busy return code to -ENOSPC

2017-10-18 Thread Gilad Ben-Yossef
st_flags(req) & CRYPTO_TFM_REQ_MAY_BACKLOG))) This patch changes the return code used to indicate a crypto op failed due to the transformation provider being transiently busy to -ENOSPC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- c

[dm-devel] [PATCH v10 00/20] simplify crypto wait for async op

2017-10-18 Thread Gilad Ben-Yossef
the change moving over the algif code which it originated from to the new API. - Inline crypto_wait_req(). - Some code indentation fixes. Gilad Ben-Yossef (20): crypto: change transient busy return code to -ENOSPC crypto: ccp: use -ENOSPC for transient busy indication net: use -ENOSPC for tran

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

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

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

2017-10-17 Thread Gilad Ben-Yossef
On Sun, Oct 15, 2017 at 6:38 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > > On Sun, Oct 15, 2017 at 10:19:45AM +0100, Gilad Ben-Yossef wrote: > > > > Changes from v8: > > - Remove the translation of EAGAIN return code to the > > previous ret

[dm-devel] [PATCH v9 20/20] crypto: adapt api sample to use async. op wait

2017-10-16 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

[dm-devel] [PATCH v9 19/20] crypto: mediatek: move to generic async completion

2017-10-15 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Ryder Lee <ryder@mediatek.com> --- drivers/crypto/mediatek/mt

[dm-devel] [PATCH v9 08/20] crypto: move pub key to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 15/20] ima: move to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 18/20] crypto: qce: move to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 10/20] crypto: move gcm to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 01/20] crypto: change transient busy return code to -EAGAIN

2017-10-15 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> --- c

[dm-devel] [PATCH v9 02/20] crypto: ccp: use -EAGAIN for transient busy indication

2017-10-15 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Reviewed-by: Gary R Hook <gary.h...@amd.com> --- Please squash this patch with the previous one when merging upstream. drivers/cr

[dm-devel] [PATCH v9 07/20] crypto: move algif to generic async completion

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

[dm-devel] [PATCH v9 00/20] simplify crypto wait for async op

2017-10-15 Thread Gilad Ben-Yossef
sting code and rebase on top of that 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 (20)

[dm-devel] [PATCH v9 17/20] crypto: talitos: move to generic async completion

2017-10-15 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(

[dm-devel] [PATCH v9 11/20] crypto: move testmgr to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 14/20] cifs: move to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 12/20] fscrypt: move to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 16/20] crypto: tcrypt: move to generic async completion

2017-10-15 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(

[dm-devel] [PATCH v9 04/20] crypto: remove redundant backlog checks on EBUSY

2017-10-15 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

[dm-devel] [PATCH v9 03/20] net: use -EAGAIN for transient busy indication

2017-10-15 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when handling transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Please squash this patch with the previous one when merging upstream. net/ipv4/ah4.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv6/ah6.

[dm-devel] [PATCH v9 09/20] crypto: move drbg to generic async completion

2017-10-15 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

[dm-devel] [PATCH v9 13/20] dm: move dm-verity to generic async completion

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

[dm-devel] [PATCH v9 06/20] crypto: introduce crypto wait for async op

2017-10-15 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> CC: Jonathan Cameron <jonathan.came...@huawei.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2

[dm-devel] [PATCH v9 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-10-15 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-elec

Re: [dm-devel] [PATCH v8 01/20] crypto: change transient busy return code to -EAGAIN

2017-10-07 Thread Gilad Ben-Yossef
On Sat, Oct 7, 2017 at 6:05 AM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Tue, Sep 05, 2017 at 03:38:40PM +0300, Gilad Ben-Yossef wrote: >> >> diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c >> index 5e92bd2..3b3c154 100644 >> --- a/cr

[dm-devel] [PATCH v8 20/20] crypto: adapt api sample to use async. op wait

2017-09-06 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

[dm-devel] [PATCH v8 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-09-05 Thread Gilad Ben-Yossef
Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Boris Brezillon <boris.brezil...@free-elec

[dm-devel] [PATCH v8 18/20] crypto: qce: move to generic async completion

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

[dm-devel] [PATCH v8 16/20] crypto: tcrypt: move to generic async completion

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

[dm-devel] [PATCH v8 10/20] crypto: move gcm to generic async completion

2017-09-05 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

[dm-devel] [PATCH v8 11/20] crypto: move testmgr to generic async completion

2017-09-05 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

[dm-devel] [PATCH v8 00/20] simplify crypto wait for async op

2017-09-05 Thread Gilad Ben-Yossef
he new API. - Inline crypto_wait_req(). - Some code indentation fixes. Gilad Ben-Yossef (20): crypto: change transient busy return code to -EAGAIN crypto: ccp: use -EAGAIN for transient busy indication net: use -EAGAIN for transient busy indication crypto: remove redundant backlog check

[dm-devel] [PATCH v8 04/20] crypto: remove redundant backlog checks on EBUSY

2017-09-05 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

[dm-devel] [PATCH v8 19/20] crypto: mediatek: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Acked-by: Ryder Lee <ryder@mediatek.com> --- drivers/crypto/mediatek/mt

[dm-devel] [PATCH v8 15/20] ima: move to generic async completion

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

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

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

[dm-devel] [PATCH v8 14/20] cifs: move to generic async completion

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

[dm-devel] [PATCH v8 02/20] crypto: ccp: use -EAGAIN for transient busy indication

2017-09-05 Thread Gilad Ben-Yossef
Replace -EBUSY with -EAGAIN when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Reviewed-by: Gary R Hook <gary.h...@amd.com> --- Please squash this patch with the previous one when merging upstream. --- driver

[dm-devel] [PATCH v8 06/20] crypto: introduce crypto wait for async op

2017-09-05 Thread Gilad Ben-Yossef
rolled versions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> CC: Eric Biggers <ebigge...@gmail.com> CC: Jonathan Cameron <jonathan.came...@huawei.com> --- crypto/api.c | 13 + include/linux/crypto.h | 40 2

[dm-devel] [PATCH v8 17/20] crypto: talitos: move to generic async completion

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

[dm-devel] [PATCH v8 09/20] crypto: move drbg to generic async completion

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

[dm-devel] [PATCH v8 13/20] dm: move dm-verity to generic async completion

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

[dm-devel] [PATCH v8 07/20] crypto: move algif to generic async completion

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

[dm-devel] [PATCH v8 12/20] fscrypt: move to generic async completion

2017-09-05 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

[dm-devel] [PATCH v8 01/20] crypto: change transient busy return code to -EAGAIN

2017-09-05 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

  1   2   3   >