Something wrong with cryptodev-2.6 tree?

2018-11-11 Thread Gilad Ben-Yossef
Hi, It seems that the cryptodev-2.6 tree at https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git has somehow rolled back 3 months ago. Not sure if it's a git.kernel.org issue or something else but probably worth taking a look? Thanks, Gilad -- Gilad Ben-Yossef Chief

Re: [PATCH 5/6] crypto: skcipher - remove useless setting of type flags

2018-06-30 Thread Gilad Ben-Yossef
off-by: Eric Biggers > --- > drivers/crypto/ccree/cc_cipher.c | 3 +-- Acked-by: Gilad Ben-Yossef

Re: [PATCH 3/6] crypto: ahash - remove useless setting of cra_type

2018-06-30 Thread Gilad Ben-Yossef
y. > Apparently the useless assignment has just been copy+pasted around. > > So, remove the useless assignment from all the ahash algorithms. > > This patch shouldn't change any actual behavior. > > Signed-off-by: Eric Biggers > --- > drivers/crypto/ccree/cc_hash.c | 1 - Acked-by: Gilad Ben-Yossef

Re: [PATCH 2/6] crypto: ahash - remove useless setting of type flags

2018-06-30 Thread Gilad Ben-Yossef
Biggers > --- > drivers/crypto/ccree/cc_hash.c | 3 +- Acked-by: Gilad Ben-Yossef -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom! ...

[PATCH v2 2/5] crypto: ccree: better clock handling

2018-05-24 Thread Gilad Ben-Yossef
Use managed clock handling, differentiate between no clock (possibly OK) and clock init failure (never OK) and correctly handle clock detection being deferred. Suggested-by: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/

[PATCH v2 3/5] crypto: ccree: silence debug prints

2018-05-24 Thread Gilad Ben-Yossef
The cache parameter register configuration was being too verbose. Use dev_dbg() to only provide the information if needed. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

[PATCH v2 5/5] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-24 Thread Gilad Ben-Yossef
Add bindings for CryptoCell instance in the SoC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a779

[PATCH v2 4/5] clk: renesas: r8a7795: add ccree clock bindings

2018-05-24 Thread Gilad Ben-Yossef
This patch adds the clock used by the CryptoCell 630p instance in the SoC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- This patch depends upon the "clk: renesas: r8a7795: Add CR clock" patch from Geert Uytterhoeven. drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1

[PATCH v2 0/5] crypto: ccree: cleanup, fixes and R-Car enabling

2018-05-24 Thread Gilad Ben-Yossef
fields as indicated by Geert Uytterhoeven. - Better clock enabling as suggested by Geert Uytterhoeven. Note! the last two patches in the set depend on the "clk: renesas: r8a7795: Add CR clock" patch from Geert Uytterhoeven. Gilad Ben-Yossef (5): crypto: ccree: correct host regs offse

[PATCH v2 1/5] crypto: ccree: correct host regs offset

2018-05-24 Thread Gilad Ben-Yossef
;) Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_debugfs.c | 7 +-- drivers/crypto/ccree/cc_driver.c| 8 ++-- drivers/crypto/ccree/cc_driver.h| 2 ++ drivers/crypto/ccree/cc_host_regs.h | 6 -- 4 files changed, 17

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-24 Thread Gilad Ben-Yossef
On Tue, May 22, 2018 at 10:48 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Mon, May 21, 2018 at 3:43 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> On Thu, May 17, 2018 at 1:16 PM, Geert Uytterhoeven >> <ge...@linux-m68k.org>

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-21 Thread Gilad Ben-Yossef
abort). > I was trying to do as you suggested but I didn't quite get what is the dev_id (2nd) parameter to devm_clk_get parameter is supposed to be. I see what of_clk_get() is doing, so can replicate that but it seems an over kill. Any ideas? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drink

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-17 Thread Gilad Ben-Yossef
On Thu, May 17, 2018 at 4:35 PM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Thu, May 17, 2018 at 3:09 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> On Thu, May 17, 2018 at 1:16 PM, Geert Uytterhoeven >> <ge...@linux-m68k.org> w

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-17 Thread Gilad Ben-Yossef
On Thu, May 17, 2018 at 12:04 PM, Simon Horman <ho...@verge.net.au> wrote: > On Thu, May 17, 2018 at 11:01:57AM +0300, Gilad Ben-Yossef wrote: >> On Wed, May 16, 2018 at 10:43 AM, Simon Horman <ho...@verge.net.au> wrote: >> > On Tue, May 15, 2018 at 04:50:44PM +

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-17 Thread Gilad Ben-Yossef
On Thu, May 17, 2018 at 1:16 PM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Thu, May 17, 2018 at 10:01 AM, Gilad Ben-Yossef <gi...@benyossef.com> > wrote: >> On Wed, May 16, 2018 at 10:43 AM, Simon Horman <ho...@verge.net.au> wrote: &g

Re: [PATCH 1/3] crypto: ccree: drop signature register check

2018-05-17 Thread Gilad Ben-Yossef
Herbert, On Tue, May 15, 2018 at 3:29 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: > We were using the content of the signature register as a sanity > check for the hardware functioning but it turns out not all > implementers use the same values so the check is giving f

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-17 Thread Gilad Ben-Yossef
On Wed, May 16, 2018 at 10:43 AM, Simon Horman <ho...@verge.net.au> wrote: > On Tue, May 15, 2018 at 04:50:44PM +0200, Geert Uytterhoeven wrote: >> Hi Gilad, >> >> On Tue, May 15, 2018 at 2:29 PM, Gilad Ben-Yossef <gi...@benyossef.com> >> wrote: &g

Re: [PATCH 2/3] clk: renesas: r8a7795: Add ccree clock

2018-05-17 Thread Gilad Ben-Yossef
On Tue, May 15, 2018 at 5:47 PM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Tue, May 15, 2018 at 2:29 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> This patch adds the clock used by the CryptoCell 630p instance in the SoC. >> >&

[PATCH 1/3] crypto: ccree: drop signature register check

2018-05-15 Thread Gilad Ben-Yossef
We were using the content of the signature register as a sanity check for the hardware functioning but it turns out not all implementers use the same values so the check is giving false negative on certain SoCs and so we drop it. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- d

[PATCH 2/3] clk: renesas: r8a7795: Add ccree clock

2018-05-15 Thread Gilad Ben-Yossef
This patch adds the clock used by the CryptoCell 630p instance in the SoC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r

[PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-15 Thread Gilad Ben-Yossef
Add bindings for CryptoCell instance in the SoC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a779

[PATCH 0/3] enable ccree on Renesas R-Car platform

2018-05-15 Thread Gilad Ben-Yossef
The following patch set enables CryptoCell present in the Renesas R-Car SoC. Gilad Ben-Yossef (3): crypto: ccree: drop signature register check clk: renesas: r8a7795: Add ccree clock arm64: dts: renesas: r8a7795: add ccree binding arch/arm64/boot/dts/renesas/r8a7795.dtsi | 8

[PATCH] crypto: reorder paes test lexicographically

2018-05-11 Thread Gilad Ben-Yossef
Due to a snafu "paes" testmgr tests were not ordered lexicographically, which led to boot time warnings. Reorder the tests as needed. Fixes: a794d8d ("crypto: ccree - enable support for hardware keys") Reported-by: Abdul Haleem <abdha...@linux.vnet.ibm.com> Signed-of

Re: [next-20180509][bisected a794d8d] ppc boot warnings at crypto/testmgr.c:3720

2018-05-11 Thread Gilad Ben-Yossef
review feedback but forgot that the cipher test names are alphabetically ordered. I wonder why I didn't see this myself as I'm 100% sure booted this fix on 2 different platforms. Maybe because Khazad was not enabled in my test setup and I guess there are no other cipher starting in I, L,M,N,O ? F

Re: DMA map buffer allocated in ahash_request_ctx

2018-05-09 Thread Gilad Ben-Yossef
ly indicated ahash request contexts are not allowed to be allocated from stack (I asked) so it should be OK. Note that you will need to map and unmap at every Crypto API invocation. You can't map on init because you are not guaranteed to have a final() or export() Hope it helps, Gilad -- Gilad Ben-Y

Re: IV generation

2018-05-07 Thread Gilad Ben-Yossef
On Mon, May 7, 2018 at 2:29 PM, Stephan Mueller <smuel...@chronox.de> wrote: > Am Montag, 7. Mai 2018, 13:19:47 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> ah... so if I have hardware that can implement say, seqiv, I can >> register "seqiv(rfc4106(g

Re: IV generation

2018-05-07 Thread Gilad Ben-Yossef
On Mon, May 7, 2018 at 2:02 PM, Stephan Mueller <smuel...@chronox.de> wrote: > Am Montag, 7. Mai 2018, 08:26:08 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> Hi, >> >> A quick question: am I correct in my understanding that there is now >> no automatic

IV generation

2018-05-07 Thread Gilad Ben-Yossef
perfectly fine with not having one, I just want to understand I am not missing something... Thanks in advance, 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 1/2] crypto: ccree: enable support for hardware keys

2018-04-26 Thread Gilad Ben-Yossef
On Wed, Apr 25, 2018 at 6:47 PM, Tudor Ambarus <tudor.amba...@microchip.com> wrote: > Hi, Gilad, > > On 04/23/2018 10:25 AM, Gilad Ben-Yossef wrote: >> >> Enable CryptoCell support for hardware keys. >> >> Hardware keys are regular AES keys loaded into Cry

Re: [PATCH 1/2] crypto: sm4 - export encrypt/decrypt routines to other drivers

2018-04-25 Thread Gilad Ben-Yossef
ypt and decrypt routines > to other drivers. > > Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> > --- > crypto/sm4_generic.c | 10 ++ > include/crypto/sm4.h | 3 +++ > 2 files changed, 9 inser

Re: [PATCH] crypto: ccree: limit build to plausible archs

2018-04-24 Thread Gilad Ben-Yossef
es the most sense to me. Fair enough. Herbert, please drop the patch than. 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] crypto: ccree: limit build to plausible archs

2018-04-24 Thread Gilad Ben-Yossef
On Mon, Apr 23, 2018 at 8:53 PM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Mon, Apr 23, 2018 at 3:22 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> On Mon, Apr 23, 2018 at 3:13 PM, Geert Uytterhoeven >> <ge...@linux-m68k.org>

Re: [PATCH] crypto: ccree: limit build to plausible archs

2018-04-23 Thread Gilad Ben-Yossef
On Mon, Apr 23, 2018 at 3:13 PM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Mon, Apr 23, 2018 at 1:48 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> Limit option to compile ccree to plausible architectures. > > Thanks for you

[PATCH] crypto: ccree: limit build to plausible archs

2018-04-23 Thread Gilad Ben-Yossef
Limit option to compile ccree to plausible architectures. Suggested-by: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/Kconfig b/drivers/cr

Re: [PATCH/RFC] crypto: Add platform dependencies for CRYPTO_DEV_CCREE

2018-04-23 Thread Gilad Ben-Yossef
On Wed, Apr 18, 2018 at 10:47 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Wed, Apr 18, 2018 at 6:32 AM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> On Tue, Apr 17, 2018 at 9:14 PM, Geert Uytterhoeven >> <ge...@linux-m68k.org>

[PATCH v2 2/2] crypto: ccree: use proper printk format

2018-04-23 Thread Gilad Ben-Yossef
Fix incorrect use of %pad as a printk format string for none dma_addr_t variable. Discovered via smatch. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto

[PATCH v2 1/2] crypto: ccree: enable support for hardware keys

2018-04-23 Thread Gilad Ben-Yossef
-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/testmgr.c | 43 + drivers/crypto/ccree/cc_cipher.c | 350 ++- drivers/crypto/ccree/cc_cipher.h | 30 +--- 3 files changed, 361 insertions(+), 62 deletions(-) diff --git a/crypto/testm

[PATCH v2 0/2] cleanup and hardware keys

2018-04-23 Thread Gilad Ben-Yossef
reference of key material, as pointed out by Herbert Gilad Ben-Yossef (2): crypto: ccree: enable support for hardware keys crypto: ccree: use proper printk format crypto/testmgr.c | 43 + drivers/crypto/ccree/cc_cipher.c | 350 ++

Re: [PATCH 2/2] crypto: ccree: enable support for hardware keys

2018-04-23 Thread Gilad Ben-Yossef
On Thu, Apr 19, 2018 at 6:35 AM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Mon, Apr 09, 2018 at 11:42:31AM +0300, Gilad Ben-Yossef wrote: >> >> Please look again. The stub version of cc_is_hw_key() doing that is being >> replaced in this patch. > &g

Re: [PATCH/RFC] crypto: Add platform dependencies for CRYPTO_DEV_CCREE

2018-04-17 Thread Gilad Ben-Yossef
perhaps thanks to the fact that the design originated in an outside company (Discretix) which was bought by Arm. Therefore, NAK on the specific patch. However, if there is some build issue with a none Arm architecture I of course very interested to hear about it. Many thanks, Gilad -- G

Re: [PATCH 2/2] crypto: ccree: enable support for hardware keys

2018-04-09 Thread Gilad Ben-Yossef
On Tue, Apr 3, 2018 at 3:22 PM, Milan Broz <gmazyl...@gmail.com> wrote: > On 03/31/2018 07:30 PM, Gilad Ben-Yossef wrote: > ... >>> Are there other crypto drivers doing this? >> >> I thought the exact same thing until I ran into a presentation about the s390

Re: [PATCH 2/2] crypto: ccree: enable support for hardware keys

2018-04-09 Thread Gilad Ben-Yossef
On Tue, Apr 3, 2018 at 1:19 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Sat, Mar 31, 2018 at 08:30:46PM +0300, Gilad Ben-Yossef wrote: >> >> However, as it uses the exact same mechanism of the regular xts-aes-ccree >> but takes the key from another source,

Re: [PATCH 2/2] crypto: ccree: enable support for hardware keys

2018-03-31 Thread Gilad Ben-Yossef
On Fri, Mar 30, 2018 at 8:26 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Mon, Mar 26, 2018 at 08:32:19AM +0100, Gilad Ben-Yossef wrote: >> Enable CryptoCell support for hardware keys. >> >> Hardware keys are regular AES keys loaded into CryptoCell inte

[PATCH 0/2] crypto: ccree: cleanup and hardware keys

2018-03-26 Thread Gilad Ben-Yossef
Small cleanup and add support for CryptoCell hardware keys. Gilad Ben-Yossef (2): crypto: ccree: remove unused enums crypto: ccree: enable support for hardware keys crypto/testmgr.c| 43 drivers/crypto/ccree/cc_cipher.c| 348

[PATCH 1/2] crypto: ccree: remove unused enums

2018-03-26 Thread Gilad Ben-Yossef
Remove enums definitions unused in the driver code. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_hw_queue_defs.h | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/drivers/crypto/ccree/cc_hw_queue_def

[PATCH 2/2] crypto: ccree: enable support for hardware keys

2018-03-26 Thread Gilad Ben-Yossef
-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/testmgr.c | 43 + drivers/crypto/ccree/cc_cipher.c | 348 ++- drivers/crypto/ccree/cc_cipher.h | 30 +--- 3 files changed, 359 insertions(+), 62 deletions(-) diff --git a/crypto/testm

[PATCH 1/2] crypto: introduce SM4 symmetric cipher algorithm

2018-03-06 Thread Gilad Ben-Yossef
in protecting wireless networks, and is mandated in the Chinese National Standard for Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure) (GB.15629.11-2003). Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/Kconfig | 25 ++ crypto/Makefile

[PATCH 2/2] crypto: introduce SM4 testmgr tests

2018-03-06 Thread Gilad Ben-Yossef
Add testmgr tests for the newly introduced SM4 ECB symmetric cipher. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- crypto/tcrypt.c | 3 ++ crypto/testmgr.c | 9 crypto/testmgr.h | 131 +++ 3 files changed, 143 inse

[PATCH 0/2] crypto: introduce SM4 symmetric cipher algorithm

2018-03-06 Thread Gilad Ben-Yossef
created for use in protecting wireless networks, and is mandated in the Chinese National Standard for Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure) (GB.15629.11-2003). Tested on arm 64 and 32 bit. Gilad Ben-Yossef (2): crypto: introduce SM4 symmetric cipher algorithm

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

[PATCH 1/4] crypto: ccree: remove unused definitions

2018-02-19 Thread Gilad Ben-Yossef
Remove enum definition which are not used by the REE interface driver. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_crypto_ctx.h | 20 1 file changed, 20 deletions(-) diff --git a/drivers/crypto/ccree/cc_crypto_ctx.h b/drivers/

[PATCH 0/4] cleanups and new HW rev support

2018-02-19 Thread Gilad Ben-Yossef
This patch set introduces backward compatible support for the older CryptoCell hardware revision 710 and 630 along some minor code cleanups. Gilad Ben-Yossef (4): crypto: ccree: remove unused definitions dt-bindings: Add DT bindings for ccree 710 and 630p crypto: ccree: add support

[PATCH 3/4] crypto: ccree: add support for older HW revs

2018-02-19 Thread Gilad Ben-Yossef
Add support for the legacy CryptoCell 630 and 710 revs. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/Kconfig | 6 +- drivers/crypto/ccree/cc_aead.c | 34 ++-- drivers/crypto/ccree/cc_cipher.c| 25 +- drivers/crypto

[PATCH 2/4] dt-bindings: Add DT bindings for ccree 710 and 630p

2018-02-19 Thread Gilad Ben-Yossef
Add device tree bindings for Arm CryptoCell 710 and 630p hardware revisions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- Documentation/devicetree/bindings/crypto/arm-cryptocell.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devi

[PATCH 4/4] crypto: ccree: replace memset+kfree with kzfree

2018-02-19 Thread Gilad Ben-Yossef
Replace memset to 0 followed by kfree with kzfree for simplicity. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_request_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto

Re: [PATCH v3 4/4] crypto: add CRYPTO_TFM_REQ_IV_SERIALIZE flag

2018-02-18 Thread Gilad Ben-Yossef
rking with the ccree driver which supports IV serialization. Tested-by: Gilad Ben-Yossef <gi...@benyossef.com> 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] crypto: AF_ALG AIO - lock context IV

2018-02-01 Thread Gilad Ben-Yossef
On Thu, Feb 1, 2018 at 12:04 PM, Stephan Mueller <smuel...@chronox.de> wrote: > Am Donnerstag, 1. Februar 2018, 10:35:07 CET schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> > >> > Which works well for the sort of optimization I did and for hardware that >&

Re: [PATCH] crypto: AF_ALG AIO - lock context IV

2018-02-01 Thread Gilad Ben-Yossef
On Thu, Feb 1, 2018 at 11:46 AM, Stephan Mueller <smuel...@chronox.de> wrote: > Am Donnerstag, 1. Februar 2018, 10:35:07 CET schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> Hi, >> >> > >> > Quoting a private email from Stephan (at Stephan's su

Re: [PATCH] crypto: AF_ALG AIO - lock context IV

2018-02-01 Thread Gilad Ben-Yossef
, that we are missing an API for chained crypto operations. One that allows submitting multiple concurrent but dependent requests to tfm providers. Trying to second guess whether or not there is a dependency between calls from the address of the IV is not a clean solution. Why don't we make it explicit? For example, a flag that can be set on a tfm that states that the subsequent series of requests are interdependent. If you need a different stream, simply allocated anotehr tfm object. This will let each driver do it's best, be it a simple mutex, software queuing or hardware dependency tracking as the case m may be. Than of course, AF_ALG code (or any other user for that matter) will not need to handle interdependence, just set the right flag. Do you think this makes sense? 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: [PATCHv2] tls: Add support for encryption using async offload accelerator

2018-01-31 Thread Gilad Ben-Yossef
t (and it seems davem agrees with me). Vakul's patch looks good to me for now. > >> > If the flag MSG_DONTWAIT is set, we should be returning -EINPROGRESS and >> > not wait for a response. I had started working on a patch for that, but >> > it's >> > pretty tricky to

Re: [PATCH] tls: Add support for encryption using async offload accelerator

2018-01-30 Thread Gilad Ben-Yossef
On Wed, Jan 31, 2018 at 8:10 AM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: > Hi Vakul, > > On Wed, Jan 31, 2018 at 12:36 PM, Vakul Garg <vakul.g...@nxp.com> wrote: >> Async crypto accelerators (e.g. drivers/crypto/caam) support offloading >> G

Re: [PATCH] tls: Add support for encryption using async offload accelerator

2018-01-30 Thread Gilad Ben-Yossef
init_completion(_done.comp); > + > rc = crypto_aead_encrypt(aead_req); > + if (rc == -EINPROGRESS) { > + wait_for_completion(_done.comp); > + rc = crypto_done.result; > + } > > ctx->sg_encrypted_data[0].offset -= t

[PATCH v2 3/7] crypto: ccree: add skcipher support

2018-01-22 Thread Gilad Ben-Yossef
Add CryptoCell skcipher support Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 125 drivers/crypto/ccree/cc_buffer_mgr.h |8 + drivers/crypto/ccree/cc_cipher.c

[PATCH v2 1/7] staging: ccree: rename staging ver and mark as broken

2018-01-22 Thread Gilad Ben-Yossef
Rename the Kconfig var of the staging tree version of the driver in preparation of introducing the final version of the driver into the cryptodev tree to avoid link time symbol collisions. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/Kconfig | 4 ++-- d

[PATCH v2 0/7] crypto: ccree: Introduce Arm TrustZone CryptoCell

2018-01-22 Thread Gilad Ben-Yossef
functionality (ivgen and secure HW keys), which will be added later. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Changes from v1: - Use KConfig directive to stop staging tree version to not collide during link time as opposed to deleting it as indicated by Greg KH. - Switche

[PATCH v2 2/7] crypto: ccree: introduce CryptoCell driver

2018-01-22 Thread Gilad Ben-Yossef
Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.

[PATCH v2 5/7] crypto: ccree: add AEAD support

2018-01-22 Thread Gilad Ben-Yossef
Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_aead.c | 2702 ++ drivers/crypto/ccree/cc_aead.h | 109 ++ drivers/crypto

[PATCH v2 4/7] crypto: ccree: add ahash support

2018-01-22 Thread Gilad Ben-Yossef
Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 261 +++- drivers/crypto/ccree/cc_driver.c | 13 + drivers/crypto/ccree/cc_driver.h

[PATCH v2 7/7] MAINTAINERS: update ccree entry

2018-01-22 Thread Gilad Ben-Yossef
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/ Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1082846..560e068 100644 --- a/MAINTAINERS

[PATCH v2 6/7] crypto: ccree: add FIPS support

2018-01-22 Thread Gilad Ben-Yossef
Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile| 1 + drivers/crypto/ccree/cc_driver.c | 29 +- drivers/crypto/ccree/cc_driver.h | 1 + drivers/crypto/ccree/cc_fips.c

Re: [PATCH][next] staging: ccree: fix memory leaks in cc_ivgen_init

2018-01-21 Thread Gilad Ben-Yossef
l_meta_dma, > @@ -196,8 +198,6 @@ int cc_ivgen_init(struct cc_drvdata *drvdata) > goto out; > } > > - drvdata->ivgen_handle = ivgen_ctx; > - > return cc_init_iv_sram(drvdata); > > out: > -- > 2.15.1 > Good catch! Acked

Re: [PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-21 Thread Gilad Ben-Yossef
Hi Corentin, On Thu, Jan 11, 2018 at 12:01 PM, Corentin Labbe <clabbe.montj...@gmail.com> wrote: > On Thu, Jan 11, 2018 at 09:17:10AM +0000, Gilad Ben-Yossef wrote: >> Add CryptoCell ablkcipher support >> > > Hello > > I have some minor comments: > > ablkc

Re: [PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-21 Thread Gilad Ben-Yossef
On Thu, Jan 11, 2018 at 12:03 PM, Stephan Mueller <smuel...@chronox.de> wrote: > Am Donnerstag, 11. Januar 2018, 10:17:10 CET schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> + // verify weak keys >> + if (ctx_p->flow_mode == S_DIN_to_DES) { >&g

Re: Getting the ccree driver out of staging

2018-01-21 Thread Gilad Ben-Yossef
t;user.key_dma_addr, >370 max_key_buf_size, DMA_TO_DEVICE); >371 ctx_p->keylen = keylen; >372 >373 dev_dbg(dev, "return safely"); > ^ > One extra space. > >374 retu

Re: [RFT PATCH] crypto: arm64 - implement SM3 secure hash using special instructions

2018-01-21 Thread Gilad Ben-Yossef
rd.biesheu...@linaro.org> > --- Looks good to me. Reviewed-by: Gilad Ben-Yossef <gi...@benyossef.com> -- 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 -next] staging: ccree: remove redundant dev_err call in init_cc_resources()

2018-01-18 Thread Gilad Ben-Yossef
dev_dbg(dev, "Got MEM resource (%s): %pR\n", req_mem_cc_regs->name, > req_mem_cc_regs); > Yeah, that makes sense. Acked-by: Gilad Ben-Yossef <gi...@benyossef.com> 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 1/7] staging: ccree: remove ccree from staging tree

2018-01-18 Thread Gilad Ben-Yossef
On Sat, Jan 13, 2018 at 3:21 PM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Thu, Jan 11, 2018 at 09:17:08AM +0000, Gilad Ben-Yossef wrote: >> Remove the ccree driver from the staging tree in preparation to >> introducing it in the crypto tree. >> >>

[PATCH 1/7] staging: ccree: remove ccree from staging tree

2018-01-11 Thread Gilad Ben-Yossef
Remove the ccree driver from the staging tree in preparation to introducing it in the crypto tree. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/Kconfig|2 - drivers/staging/Makefile |1 - .../devi

[PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-11 Thread Gilad Ben-Yossef
Add CryptoCell ablkcipher support Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 125 drivers/crypto/ccree/cc_buffer_mgr.h | 10 + drivers/crypto/ccree/cc_cipher.c

[PATCH 2/7] crypto: ccree: introduce CryptoCell driver

2018-01-11 Thread Gilad Ben-Yossef
Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.

[PATCH 6/7] crypto: ccree: add FIPS support

2018-01-11 Thread Gilad Ben-Yossef
Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile| 1 + drivers/crypto/ccree/cc_driver.c | 29 +- drivers/crypto/ccree/cc_driver.h | 1 + drivers/crypto/ccree/cc_fips.c

[PATCH 5/7] crypto: ccree: add AEAD support

2018-01-11 Thread Gilad Ben-Yossef
Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_aead.c | 2702 ++ drivers/crypto/ccree/cc_aead.h | 109 ++ drivers/crypto

[PATCH 4/7] crypto: ccree: add ahash support

2018-01-11 Thread Gilad Ben-Yossef
Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 257 drivers/crypto/ccree/cc_driver.c | 13 + drivers/crypto/ccree/cc_driver.h

[PATCH 7/7] MAINTAINERS: update ccree entry

2018-01-11 Thread Gilad Ben-Yossef
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/ Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1082846..560e068 100644 --- a/MAINTAINERS

[PATCH 0/7] Introduce Arm TrustZone CryptoCell

2018-01-11 Thread Gilad Ben-Yossef
and secure HW keys). Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Gilad Ben-Yossef (7): staging: ccree: remove ccree from staging tree crypto: ccree: introduce CryptoCell driver crypto: ccree: add ablkcipher support crypto: ccree: add ahash support crypto: ccree: ad

Re: Getting the ccree driver out of staging

2018-01-10 Thread Gilad Ben-Yossef
On Wed, Jan 10, 2018 at 6:39 PM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Wed, Jan 10, 2018 at 08:54:55AM +0200, Gilad Ben-Yossef wrote: >> Hi folks, >> >> With the enormous help of people in the to and CCed lists I've gotten >> the ccree driver

Getting the ccree driver out of staging

2018-01-09 Thread Gilad Ben-Yossef
of tcrypt tests. - It works :-) There are obviously more things todo, but I believe they are out of scope for staging. So, if you see something that still needs work, kindly let me know. Alternatively, will you accept a patch moving it to drivers/crypto/? Many thanks, Gilad -- Gilad Ben-Yossef

[PATCH 2/5] staging: ccree: remove unneeded includes

2018-01-09 Thread Gilad Ben-Yossef
Remove include files not needed for compilation. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_aead.c| 7 --- drivers/staging/ccree/cc_buffer_mgr.c | 6 -- drivers/staging/ccree/cc_cipher.c | 4 drivers/staging/ccree/cc_dr

[PATCH 1/5] staging: ccree: use a consistent file naming convention

2018-01-09 Thread Gilad Ben-Yossef
The ccree driver source files were using an inconsistent naming convention stemming from what the company was called when they were added. Move to a single consistent naming convention for better code readability. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging

[PATCH 3/5] staging: ccree: add missing include

2018-01-09 Thread Gilad Ben-Yossef
Add the missing include of include file with function declarations. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_debugfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/ccree/cc_debugfs.c b/drivers/staging/ccree/cc_debugfs.c

[PATCH 4/5] staging: ccree: make stub function static inline

2018-01-09 Thread Gilad Ben-Yossef
The debugfs interface defines stub function if debugfs is not enabled, which were missing the 'static inline' qualifiers causing sparse warnings. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_debugfs.h | 8 1 file changed, 4 insertions

[PATCH 5/5] staging: ccree: dma mask is type u64

2018-01-09 Thread Gilad Ben-Yossef
The dma mask var was defined as dma_addr_t but should be u64. This showed as a sparse warning when building for 32 bit. Fix it by changing type to u64 and drop the cast. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_driver.c | 4 ++-- 1 file chan

[PATCH 0/5] more cleanups

2018-01-09 Thread Gilad Ben-Yossef
File name consistency renames, include files diet and address some sparse warnings. Gilad Ben-Yossef (5): staging: ccree: use a consistent file naming convention staging: ccree: remove unneeded includes staging: ccree: add missing include staging: ccree: make stub function static inline

Re: [PATCH v3 24/27] staging: ccree: use a consistent file naming convention

2018-01-08 Thread Gilad Ben-Yossef
On Mon, Jan 8, 2018 at 5:28 PM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Sun, Jan 07, 2018 at 12:14:35PM +0000, Gilad Ben-Yossef wrote: >> The ccree driver source files were using an inconsistent >> naming convention stemming from what the company was cal

Re: [PATCH] checkpatch: add *_ON_STACK to $declaration_macros

2018-01-08 Thread Gilad Ben-Yossef
On Wed, Dec 20, 2017 at 11:41 AM, Joe Perches <j...@perches.com> wrote: > On Tue, 2017-06-27 at 10:55 +0300, Gilad Ben-Yossef wrote: >> Add the crypto API *_ON_STACK to $declaration_macros. >> >> Resolves the following false warning: >> >> WARNING:

[PATCH v3 06/27] staging: ccree: copy larval digest from RAM

2018-01-07 Thread Gilad Ben-Yossef
The ccree driver was using a DMA operation to copy larval digest from the ccree SRAM to RAM. Replace it with a simple memcpy. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_driver.c | 2 + drivers/staging/ccree/ssi_hash.c

[PATCH v3 07/27] staging: ccree: tag debugfs init/exit func properly

2018-01-07 Thread Gilad Ben-Yossef
The debugfs global init and exit functions were missing __init and __exit tags, potentially wasting memory. Fix it by properly tagging them. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH v3 04/27] staging: ccree: remove GFP_DMA flag from mem allocs

2018-01-07 Thread Gilad Ben-Yossef
Remove bogus GFP_DMA flag from memory allocations. ccree driver does not operate over an ISA or similar limited bus. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_hash.c | 15 ++- 2 files chan

[PATCH v3 01/27] staging: ccree: SPDXify driver

2018-01-07 Thread Gilad Ben-Yossef
Replace verbatim GPL v2 copy with SPDX tag. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/Kconfig| 2 ++ drivers/staging/ccree/Makefile | 2 ++ drivers/staging/ccree/cc_crypto_ctx.h| 17 ++--- drivers/staging

[PATCH v3 02/27] staging: ccree: fold hash defs into queue defs

2018-01-07 Thread Gilad Ben-Yossef
Fold the two remaining enum in hash defs into the queue defs that are using them and delete the hash defs include file. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/staging/ccree/cc_hw_queue_defs.h | 13 + drivers/staging/ccree/hash_defs.h

  1   2   3   4   5   6   7   8   9   >