Re: [PATCH 0/4] add CAAM DMA memcpy driver

2017-10-27 Thread Horia Geantă
On 10/27/2017 2:36 PM, Koul, Vinod wrote: >> On 10/26/2017 1:01 PM, Radu Alexe wrote: >>> This patch-set introduces a new DMA memcpy driver based on the DMA >>> capabilities of the CAAM crypto engine. Because of this dependency the >>> included commits target various parts of the kernel tree. >> I

Re: [PATCH 0/4] add CAAM DMA memcpy driver

2017-10-27 Thread Horia Geantă
On 10/26/2017 1:01 PM, Radu Alexe wrote: > This patch-set introduces a new DMA memcpy driver based on the DMA > capabilities of the CAAM crypto engine. Because of this dependency the > included commits target various parts of the kernel tree. I don't see the patches on any of the mail lists. If

[PATCH] crypto: caam/qi - abort algorithm setup on DPAA2 parts

2017-10-24 Thread Horia Geantă
caam/qi frontend (i.e. caamalg_qi) mustn't be used in case it runs on a DPAA2 part (this could happen when using a multiplatform kernel). Fixes: 297b9cebd2fc ("crypto: caam/jr - add support for DPAA2 parts") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- If this

[PATCH] crypto: caam - fix incorrect define

2017-10-24 Thread Horia Geantă
From: Radu Alexe <radu.al...@nxp.com> Fixes: 3ebfa92f49a6 ("crypto: caam - Add new macros for building extended SEC descriptors (> 64 words)") Signed-off-by: Radu Alexe <radu.al...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caa

[PATCH] MAINTAINERS: update caam crypto driver maintainers list

2017-10-13 Thread Horia Geantă
Dan steps down as caam maintainer, being replaced by Aymen. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 92df4e80a170..bb3016c2c342 100644 --- a/MAINTAINERS +++ b/MAINT

Re: crypto API - async semantics

2017-10-12 Thread Horia Geantă
On 10/12/2017 12:49 PM, Herbert Xu wrote: > On Thu, Oct 12, 2017 at 09:39:34AM +0000, Horia Geantă wrote: >> >> Taking ascii art from crypto API docs: >> >> DATA ---. >> v >> .init() -> .update() ->

Re: crypto API - async semantics

2017-10-12 Thread Horia Geantă
On 10/12/2017 9:44 AM, Herbert Xu wrote: > On Wed, Oct 11, 2017 at 12:36:11PM +0000, Horia Geantă wrote: >> Hi Herbert, >> >> I am evaluating whether ahash implementation in caam crypto driver >> behaves correctly. >> One thing I've noticed is that fo

crypto API - async semantics

2017-10-11 Thread Horia Geantă
Hi Herbert, I am evaluating whether ahash implementation in caam crypto driver behaves correctly. One thing I've noticed is that for each ahash tfm there is support for at most two in-flight requests, and I would like to know whether this is an issue or not. In this context, could you please

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

2017-09-07 Thread Horia Geantă
On 9/6/2017 1:14 PM, Gilad Ben-Yossef wrote: > On Tue, Sep 5, 2017 at 6:33 PM, Horia Geantă <horia.gea...@nxp.com> wrote: >> On 8/14/2017 10:59 AM, Gilad Ben-Yossef wrote: >>> Hi, >>> >>> On Thu, Jun 29, 2017 at 1:19 PM, Horia Geantă <horia.gea...@nxp

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

2017-09-05 Thread Horia Geantă
On 8/14/2017 10:59 AM, Gilad Ben-Yossef wrote: > Hi, > > On Thu, Jun 29, 2017 at 1:19 PM, Horia Geantă <horia.gea...@nxp.com> wrote: >> On 6/28/2017 4:42 PM, Horia Geantă wrote: >>> On 6/28/2017 4:27 PM, David Gstir wrote: >>>> Certain ciph

[PATCH] crypto: caam - fix LS1021A support on ARMv7 multiplatform kernel

2017-09-01 Thread Horia Geantă
sta...@vger.kernel.org> Fixes: 6c3af9559352 ("crypto: caam - add support for LS1021A") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/Kconfig | 5 +--- drivers/crypto/caam/ctrl.c | 19 --- drivers/cr

[RFC PATCH 03/10] staging: fsl-mc: dpio: add order preservation support

2017-08-10 Thread Horia Geantă
From: Radu Alexe <radu.al...@nxp.com> Order preservation is a feature that will be supported in dpni, dpseci and dpci devices. This is a preliminary patch for the changes to be introduced in the corresponding drivers. Signed-off-by: Radu Alexe <radu.al...@nxp.com> Signed-off-by:

[RFC PATCH 04/10] staging: fsl-dpaa2/eth: move generic FD defines to DPIO

2017-08-10 Thread Horia Geantă
her accelerators can make use of them. While here, fix the values of FD_CTRL_FSE and FD_CTRL_FAERR, which were shifted off by one bit. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 8 +++- drivers/staging/fsl-dpaa2

[RFC PATCH 01/10] staging: fsl-mc: dpio: add frame list format support

2017-08-10 Thread Horia Geantă
FLE case) - FLC[5:0] not used for stashing Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/staging/fsl-mc/include/dpaa2-fd.h | 243 ++ 1 file changed, 243 insertions(+) diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-m

[RFC PATCH 00/10] crypto: caam - add DPAA2 (DPSECI) driver

2017-08-10 Thread Horia Geantă
. It will be built only if dependency on DPIO (CONFIG_FSL_MC_DPIO) is satisfied. Thanks, Horia Horia Geantă (9): staging: fsl-mc: dpio: add frame list format support staging: fsl-mc: dpio: add congestion notification support staging: fsl-dpaa2/eth: move generic FD defines to DPIO crypto: caam

[RFC PATCH 09/10] crypto: caam/qi2 - add ablkcipher algorithms

2017-08-10 Thread Horia Geantă
Add support to submit the following ablkcipher algorithms via the DPSECI backend: cbc({aes,des,des3_ede}) ctr(aes), rfc3686(ctr(aes)) xts(aes) Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/Kconfig | 1 + drivers/crypto/caam/caamalg_qi2.c

[RFC PATCH 07/10] crypto: caam - add Queue Interface v2 error codes

2017-08-10 Thread Horia Geantă
Add support to translate error codes returned by QI v2, i.e. Queue Interface present on DataPath Acceleration Architecture v2 (DPAA2). Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/error.c | 75 +++-- drivers/crypt

[RFC PATCH 10/10] arm64: defconfig: enable CAAM crypto engine on QorIQ DPAA2 SoCs

2017-08-10 Thread Horia Geantă
Enable CAAM (Cryptographic Accelerator and Assurance Module) driver for QorIQ Data Path Acceleration Architecture (DPAA) v2. It handles DPSECI (Data Path SEC Interface) DPAA2 objects that sit on the Management Complex (MC) fsl-mc bus. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> ---

[RFC PATCH 06/10] crypto: caam - add DPAA2-CAAM (DPSECI) backend API

2017-08-10 Thread Horia Geantă
Add the low-level API that allows to manage DPSECI DPAA2 objects that sit on the Management Complex (MC) fsl-mc bus. The API is compatible with MC firmware 10.2.0+. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/dpseci.c

[RFC PATCH 08/10] crypto: caam/qi2 - add DPAA2-CAAM driver

2017-08-10 Thread Horia Geantă
(hmac({md5,sha*}),cbc({aes,des,des3_ede})) echainiv(authenc(hmac({md5,sha*}),cbc({aes,des,des3_ede}))) authenc(hmac({md5,sha*}),rfc3686(ctr(aes)) seqiv(authenc(hmac({md5,sha*}),rfc3686(ctr(aes))) Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/Makefile |

[RFC PATCH 05/10] crypto: caam/qi - prepare for gcm(aes) support

2017-08-10 Thread Horia Geantă
Update gcm(aes) descriptors (generic, rfc4106 and rfc4543) such that they would also work when submitted via the QI interface. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg.c | 19 +++-- drivers/crypto/caam/caamalg_desc.c

[RFC PATCH 02/10] staging: fsl-mc: dpio: add congestion notification support

2017-08-10 Thread Horia Geantă
.@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/staging/fsl-mc/include/dpaa2-io.h | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/staging/fsl-mc/include/dpaa2-io.h b/drivers/staging/fsl-mc/include/dpaa2-io.h

Re: [PATCH 0/4] crypto: caam - add Job Ring support for DPAA2 parts

2017-08-03 Thread Horia Geantă
On 7/25/2017 4:50 PM, Shawn Guo wrote: > On Tue, Jul 25, 2017 at 01:31:52PM +0000, Horia Geantă wrote: >> On 7/25/2017 4:22 PM, Shawn Guo wrote: >>> On Tue, Jul 18, 2017 at 06:30:46PM +0300, Horia Geantă wrote: >>>> This patch set adds support for CAAM's legac

Re: [PATCH v1] crypto: caam - set hwrng quality level

2017-08-03 Thread Horia Geantă
On 8/3/2017 6:17 AM, Herbert Xu wrote: > On Wed, Aug 02, 2017 at 02:03:14PM +0000, Horia Geantă wrote: >> >> Take CAAM's engine HWRNG: it can work both as a TRNG and as a >> TRNG-seeded DRBG (that's how it's currently configured). >> IIUC, both setups are fit as

Re: [PATCH v1] crypto: caam - set hwrng quality level

2017-08-02 Thread Horia Geantă
On 7/20/2017 4:08 PM, Harald Freudenberger wrote: > On 07/19/2017 08:13 PM, Oleksij Rempel wrote: >> On Wed, Jul 19, 2017 at 04:53:21PM +0000, Horia Geantă wrote: >>> On 7/19/2017 7:32 PM, Oleksij Rempel wrote: >>>> On Wed, Jul 19, 2017 at 12:49:47PM +, Horia Ge

Re: [PATCH v3] crypto: caam: Remove unused dentry members

2017-08-02 Thread Horia Geantă
m <feste...@gmail.com> Acked-by: Horia Geantă <horia.gea...@nxp.com> Thanks, Horia

Re: [PATCH v2] crypto: caam: Remove unused dentry members

2017-08-01 Thread Horia Geantă
On 7/31/2017 3:22 PM, Fabio Estevam wrote: > Most of the dentry members from structure caam_drv_private > are never used at all, so it is safe to remove them. > > Since debugfs_remove_recursive() is called, we don't need the > file entries. > > Signed-off-by: Fabio Estevam >

Re: [PATCH v5 0/6] make io{read|write}64 globally usable

2017-07-31 Thread Horia Geantă
On 7/27/2017 2:19 AM, Logan Gunthorpe wrote: > Changes since v4: > - Add functions so the powerpc implementation of iomap.c compiles. (As > noticed by Horia) Tested-by: Horia Geantă <horia.gea...@nxp.com> more exactly: crypto self-tests pass on CAAM crypto engine on NXP platforms

Re: [PATCH] crypto: caam/qi - Remove unused 'qi_congested' entry

2017-07-31 Thread Horia Geantă
On 7/30/2017 1:55 AM, Fabio Estevam wrote: > From: Fabio Estevam > > 'qi_congested' member from structure caam_drv_private > is never used at all, so it is safe to remove it. Agree, though I would remove all the other dentry members not currently used - since

Re: [RFC PATCH] crypto: caam - convert from ablkcipher -> skcipher

2017-07-28 Thread Horia Geantă
On 9/1/2016 1:13 PM, Herbert Xu wrote: > On Mon, Aug 29, 2016 at 05:11:24PM +0300, Horia Geantă wrote: >> (a)blkcipher is being deprecated in favcur of skcipher. >> The main difference is that IV generation is moved out >> of crypto algorithms. >> >> Signe

Re: [PATCH 0/4] crypto: caam - add Job Ring support for DPAA2 parts

2017-07-25 Thread Horia Geantă
On 7/25/2017 4:22 PM, Shawn Guo wrote: > On Tue, Jul 18, 2017 at 06:30:46PM +0300, Horia Geantă wrote: >> This patch set adds support for CAAM's legacy Job Ring backend / interface >> on platforms having DPAA2 (Datapath Acceleration Architecture v2), like >> LS1088A or LS2088

Re: [PATCH v4 1/5] powerpc: io.h: move iomap.h include so that it can use readq/writeq defs

2017-07-20 Thread Horia Geantă
On 7/20/2017 1:27 PM, Horia Geantă wrote: > On 7/19/2017 7:04 PM, Logan Gunthorpe wrote: >> >> >> On 18/07/17 11:57 PM, Michael Ellerman wrote: >>> Seems fair enough, have you tested it at all? >> >> It's only been compile tested and the kbuild robo

Re: [PATCH v4 1/5] powerpc: io.h: move iomap.h include so that it can use readq/writeq defs

2017-07-20 Thread Horia Geantă
On 7/19/2017 7:04 PM, Logan Gunthorpe wrote: > > > On 18/07/17 11:57 PM, Michael Ellerman wrote: >> Seems fair enough, have you tested it at all? > > It's only been compile tested and the kbuild robot has beat up on it a bit. > Looks like the patch set does not compile on PPC (.config

Re: [PATCH v1] crypto: caam - set hwrng quality level

2017-07-19 Thread Horia Geantă
On 7/19/2017 7:32 PM, Oleksij Rempel wrote: > On Wed, Jul 19, 2017 at 12:49:47PM +0000, Horia Geantă wrote: >> On 7/19/2017 10:45 AM, Oleksij Rempel wrote: >>> According documentation, it is NIST certified TRNG. >>> So, set high quality to let the HWRNG

[PATCH] crypto: tcrypt - remove AES-XTS-192 speed tests

2017-07-19 Thread Horia Geantă
tcrypt: setkey() failed flags=20 [...] Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- crypto/tcrypt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 0dd6a432d6ca..0022a18d36ee 100644 --- a/crypto/tcrypt.c +++ b/

Re: [PATCH v1] crypto: caam - set hwrng quality level

2017-07-19 Thread Horia Geantă
On 7/19/2017 10:45 AM, Oleksij Rempel wrote: > According documentation, it is NIST certified TRNG. > So, set high quality to let the HWRNG framework automatically use it. > > Signed-off-by: Oleksij Rempel > --- > drivers/crypto/caam/caamrng.c | 6 ++ > 1 file

AES-XTS key size

2017-07-19 Thread Horia Geantă
Hi, AFAICS, IEEE 1619-2007 standard mentions only XTS-AES-128 and XTS-AES-256, meaning that the keys should be either 256 or 512 bits. Further, NIST SP800-38E mentions that an implementation may restrict support to only one of XTS-AES-{128,256}, but does not explicitly allow other cipher suites.

[PATCH 2/4] arm64: dts: freescale: ls208xa: share aliases node

2017-07-18 Thread Horia Geantă
aliases node is identical for all boards, thus move it to the common file ls208xa.dtsi. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts | 5 - arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts | 5 - arch/arm64/boot/dts/fre

[PATCH 3/4] arm64: dts: freescale: ls208xa: add crypto node

2017-07-18 Thread Horia Geantă
LS208xA has a SEC v5.1 security engine. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 41 ++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/bo

[PATCH 1/4] crypto: caam/jr - add support for DPAA2 parts

2017-07-18 Thread Horia Geantă
Add support for using the caam/jr backend on DPAA2-based SoCs. These have some particularities we have to account for: -HW S/G format is different -Management Complex (MC) firmware initializes / manages (partially) the CAAM block: MCFGR, QI enablement in QICTL, RNG Signed-off-by: Horia Geantă

[PATCH 0/4] crypto: caam - add Job Ring support for DPAA2 parts

2017-07-18 Thread Horia Geantă
, Horia Horia Geantă (4): crypto: caam/jr - add support for DPAA2 parts arm64: dts: freescale: ls208xa: share aliases node arm64: dts: freescale: ls208xa: add crypto node arm64: dts: freescale: ls1088a: add crypto node arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 43

[PATCH 4/4] arm64: dts: freescale: ls1088a: add crypto node

2017-07-18 Thread Horia Geantă
LS1088A has a SEC v5.3 security engine. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 43 ++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi b/arch/arm64/bo

Re: [PATCH v2] crypto: caam - free qman_fq after kill_fq

2017-07-13 Thread Horia Geantă
14c/0x308 > [] cryptomgr_test+0x50/0x58 > [] kthread+0xdc/0xf0 > [] ret_from_fork+0x10/0x50 > > And check where the function kill_fq() is called to remove > the additional kfree to qman_fq and avoid re-calling the released qman_fq. > > Signed-off-by: Xulin Sun <xulin@windriver.com> Acked-by: Horia Geantă <horia.gea...@nxp.com> Thanks, Horia

Re: [PATCH] crypto: caam - free qman_fq after kill_fq

2017-07-13 Thread Horia Geantă
On 7/11/2017 9:21 AM, Xulin Sun wrote: > kill_fq removes a complete frame queue, it needs to free the qman_fq > in the last. Else kmemleak will report the below warning: > > unreferenced object 0x800073085c80 (size 128): > comm "cryptomgr_test", pid 199, jiffies 4294937850 (age 67.840s) >

[PATCH v2 10/13] crypto: caam - remove unused sg_to_sec4_sg_len()

2017-07-09 Thread Horia Geantă
sg_to_sec4_sg_len() is no longer used since commit 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") Its functionality has been superseded by the usage of sg_nents_for_len() returning the number of S/G entries corresponding to the provided length. Signed-off-by: Ho

[PATCH v2 11/13] crypto: caam - remove unused variables in caam_drv_private

2017-07-09 Thread Horia Geantă
From: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/ctrl.c | 1 - drivers/crypto/caam/intern.h | 3 --- 2 files changed, 4 deletions(-) diff --gi

[PATCH v2 13/13] crypto: caam - fix condition for the jump over key(s) command

2017-07-09 Thread Horia Geantă
From: Tudor Ambarus <tudor-dan.amba...@nxp.com> SELF condition has no meaning for the SERIAL sharing since the jobs are executed in the same DECO. Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/c

[PATCH v2 07/13] crypto: caam/qi - explicitly set dma_ops

2017-07-09 Thread Horia Geantă
rt") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/qi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 01284faeee69..1c1f3faf6394 100644 --- a/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi

[PATCH v2 01/13] crypto: caam/qi - fix typo in authenc alg driver name

2017-07-09 Thread Horia Geantă
s/desi/des for echainiv(authenc(hmac(sha256),cbc(des))) alg. Cc: <sta...@vger.kernel.org> Fixes: b189817cf7894 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 2 +- 1 fil

[PATCH v2 00/13] crypto: caam - fixes, clean-up

2017-07-09 Thread Horia Geantă
2.y. Patches 8-13 contain code clean-up. Thanks, Horia Horia Geantă (11): crypto: caam/qi - fix typo in authenc alg driver name crypto: caam/qi - fix compilation with DEBUG enabled crypto: caam/qi - fix compilation with CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y crypto: caam/qi - properly set IV af

[PATCH v2 08/13] crypto: caam/qi - remove unused header sg_sw_sec4.h

2017-07-09 Thread Horia Geantă
sg_sw_sec4.h header is not used by caam/qi, thus remove its inclusion. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c index 82e9f9

[PATCH v2 09/13] crypto: caam/qi - lower driver verbosity

2017-07-09 Thread Horia Geantă
Change log level for some prints from dev_info() to dev_dbg(), low-level details are needed only when debugging. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/qi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/

[PATCH v2 12/13] crypto: caam - clean-up in caam_init_rng()

2017-07-09 Thread Horia Geantă
Clean up the code, as indicated by Coccinelle. Cc: Julia Lawall <julia.law...@lip6.fr> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- v2: fix author - replace my Freescale address with corresponding NXP one drivers/crypto/caam/caamrng.c | 6 +- 1 file changed, 1 ins

[PATCH v2 06/13] crypto: caam/qi - fix AD length endianness in S/G entry

2017-07-09 Thread Horia Geantă
Associated data (AD) length is read by CAAM from an S/G entry that is initially filled by the GPP. Accordingly, AD length has to be stored in CAAM endianness. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.g

[PATCH v2 03/13] crypto: caam/qi - fix compilation with CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y

2017-07-09 Thread Horia Geantă
robot <fengguang...@intel.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/qi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 1990ed460c46..53aed5816416 100644 --- a/drivers/crypto/caam/qi

[PATCH v2 04/13] crypto: caam/qi - properly set IV after {en,de}crypt

2017-07-09 Thread Horia Geantă
lgorithms") Suggested-by: David Gstir <da...@sigma-star.at> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypt

[PATCH v2 02/13] crypto: caam/qi - fix compilation with DEBUG enabled

2017-07-09 Thread Horia Geantă
consistent in terms of exported symbols namespace (caam_*) Cc: <sta...@vger.kernel.org> Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg.c| 66 +-

[PATCH v2 05/13] crypto: caam/qi - handle large number of S/Gs case

2017-07-09 Thread Horia Geantă
fc == Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- v2: add missing check in ablkcipher_giv_edesc_alloc(), to make sure number of reserved S/G entries is not overflown drivers/crypt

Re: [PATCH 05/13] crypto: caam/qi - handle large number of S/Gs case

2017-07-09 Thread Horia Geantă
On 7/7/2017 4:06 PM, Horia Geantă wrote: > For more than 16 S/G entries, driver currently corrupts memory > on ARMv8, see below KASAN log. > Note: this does not reproduce on PowerPC due to different (smaller) > cache line size - 64 bytes on PPC vs. 128 bytes on ARMv8. > > One su

[RFC PATCH] crypto: caam - fix signals handling

2017-07-07 Thread Horia Geantă
- would be to flush the job ring (aborting *all* in-progress jobs). Cc: <sta...@vger.kernel.org> Fixes: 045e36780f115 ("crypto: caam - ahash hmac support") Fixes: 4c1ec1f930154 ("crypto: caam - refactor key_gen, sg") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> ---

Re: [PATCH 12/13] crypto: caam - clean-up in caam_init_rng()

2017-07-07 Thread Horia Geantă
On 7/7/2017 4:06 PM, Horia Geantă wrote: > From: Horia Geantă <horia.gea...@freescale.com> > > Clean up the code, as indicated by Coccinelle. > > Cc: Julia Lawall <julia.law...@lip6.fr> > Signed-off-by: Horia Geantă <horia.gea...@freescale.com> > Signed-off

[PATCH 08/13] crypto: caam/qi - remove unused header sg_sw_sec4.h

2017-07-07 Thread Horia Geantă
sg_sw_sec4.h header is not used by caam/qi, thus remove its inclusion. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c index e84c19

[PATCH 13/13] crypto: caam - fix condition for the jump over key(s) command

2017-07-07 Thread Horia Geantă
From: Tudor Ambarus <tudor-dan.amba...@nxp.com> SELF condition has no meaning for the SERIAL sharing since the jobs are executed in the same DECO. Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/c

[PATCH 11/13] crypto: caam - remove unused variables in caam_drv_private

2017-07-07 Thread Horia Geantă
From: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/ctrl.c | 1 - drivers/crypto/caam/intern.h | 3 --- 2 files changed, 4 deletions(-) diff --gi

[PATCH 01/13] crypto: caam/qi - fix typo in authenc alg driver name

2017-07-07 Thread Horia Geantă
s/desi/des for echainiv(authenc(hmac(sha256),cbc(des))) alg. Cc: <sta...@vger.kernel.org> Fixes: b189817cf7894 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 2 +- 1 fil

[PATCH 12/13] crypto: caam - clean-up in caam_init_rng()

2017-07-07 Thread Horia Geantă
From: Horia Geantă <horia.gea...@freescale.com> Clean up the code, as indicated by Coccinelle. Cc: Julia Lawall <julia.law...@lip6.fr> Signed-off-by: Horia Geantă <horia.gea...@freescale.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caam

[PATCH 09/13] crypto: caam/qi - lower driver verbosity

2017-07-07 Thread Horia Geantă
Change log level for some prints from dev_info() to dev_dbg(), low-level details are needed only when debugging. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/qi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/

[PATCH 10/13] crypto: caam - remove unused sg_to_sec4_sg_len()

2017-07-07 Thread Horia Geantă
sg_to_sec4_sg_len() is no longer used since commit 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") Its functionality has been superseded by the usage of sg_nents_for_len() returning the number of S/G entries corresponding to the provided length. Signed-off-by: Ho

[PATCH 07/13] crypto: caam/qi - explicitly set dma_ops

2017-07-07 Thread Horia Geantă
rt") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/qi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 01284faeee69..1c1f3faf6394 100644 --- a/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi

[PATCH 05/13] crypto: caam/qi - handle large number of S/Gs case

2017-07-07 Thread Horia Geantă
fc == Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 24 +++- drivers/crypto/caam/qi.c | 3 --- drivers/crypto/caam/qi.h

[PATCH 06/13] crypto: caam/qi - fix AD length endianness in S/G entry

2017-07-07 Thread Horia Geantă
Associated data (AD) length is read by CAAM from an S/G entry that is initially filled by the GPP. Accordingly, AD length has to be stored in CAAM endianness. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.g

[PATCH 04/13] crypto: caam/qi - properly set IV after {en,de}crypt

2017-07-07 Thread Horia Geantă
lgorithms") Suggested-by: David Gstir <da...@sigma-star.at> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg_qi.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypt

[PATCH 03/13] crypto: caam/qi - fix compilation with CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y

2017-07-07 Thread Horia Geantă
robot <fengguang...@intel.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/qi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 1990ed460c46..53aed5816416 100644 --- a/drivers/crypto/caam/qi

[PATCH 02/13] crypto: caam/qi - fix compilation with DEBUG enabled

2017-07-07 Thread Horia Geantă
consistent in terms of exported symbols namespace (caam_*) Cc: <sta...@vger.kernel.org> Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg.c| 66 +-

[PATCH 00/13] crypto: caam - fixes, clean-up

2017-07-07 Thread Horia Geantă
- Queue Manager), there's no need to be applied on v4.12.y. Patches 8-13 contain code clean-up. Thanks, Horia Horia Geantă (11): crypto: caam/qi - fix typo in authenc alg driver name crypto: caam/qi - fix compilation with DEBUG enabled crypto: caam/qi - fix compilation

Re: [PATCH v3 4/4] crypto: caam: cleanup CONFIG_64BIT ifdefs when using io{read|write}64

2017-06-30 Thread Horia Geantă
On 6/29/2017 7:10 PM, Logan Gunthorpe wrote: > From: Horia Geantă <horia.gea...@nxp.com> > > We can now make use of the io-64-nonatomic-hi-lo header to always Typo: we are using io-64-nonatomic-lo-hi, not hi-lo. Thanks, Horia

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

2017-06-29 Thread Horia Geantă
On 6/28/2017 4:42 PM, Horia Geantă wrote: > On 6/28/2017 4:27 PM, David Gstir wrote: >> Certain cipher modes like CTS expect the IV (req->info) of >> ablkcipher_request (or equivalently req->iv of skcipher_request) to >> contain the last ciphertext block when the {en

Re: [PATCH v2 3/3] crypto: caam: cleanup CONFIG_64BIT ifdefs when using io{read|write}64

2017-06-29 Thread Horia Geantă
On 6/28/2017 7:51 PM, Logan Gunthorpe wrote: > > > On 28/06/17 04:20 AM, Arnd Bergmann wrote: >> On Wed, Jun 28, 2017 at 1:02 AM, Logan Gunthorpe wrote: >>> #include >>> #include >>> -#include >>> +#include >> >> Here you include the hi-lo variant unconditionally. >>

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

2017-06-28 Thread Horia Geantă
e in commit > 0605c41cc53ca ("crypto: cts - Convert to skcipher") > > Cc: <sta...@vger.kernel.org> # 4.8+ > Signed-off-by: David Gstir <da...@sigma-star.at> Reviewed-by: Horia Geantă <horia.gea...@nxp.com> Thanks, Horia

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

2017-06-28 Thread Horia Geantă
On 6/19/2017 1:31 PM, Horia Geantă wrote: > On 6/2/2017 3:25 PM, David Gstir wrote: >> Certain cipher modes like CTS expect the IV (req->info) of >> ablkcipher_request (or equivalently req->iv of skcipher_request) to >> contain the last ciphertext block when the {en

[PATCH v2 7/7] crypto: caam: cleanup CONFIG_64BIT ifdefs when using io{read|write}64

2017-06-24 Thread Horia Geantă
Now that ioread64 and iowrite64 are always available we don't need the ugly ifdefs to change their implementation when they are not. Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Cc: Horia Geantă <horia.gea...@nxp.com> Cc: Dan Douglass <dan.dougl...@nxp.com> Cc

Re: [PATCH 7/7] crypto: caam: cleanup CONFIG_64BIT ifdefs when using io{read|write}64

2017-06-23 Thread Horia Geantă
return ((u64)rd_reg32((u32 __iomem *)(reg)) << 32 | - (u64)rd_reg32((u32 __iomem *)(reg) + 1)); + return ioread64be(reg); } -#endif /* CONFIG_64BIT */ #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT #ifdef CONFIG_SOC_IMX7D > Signed-off-by: Logan Gunth

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

2017-06-19 Thread Horia Geantă
On 6/2/2017 3:25 PM, David Gstir wrote: > Certain cipher modes like CTS expect the IV (req->info) of > ablkcipher_request (or equivalently req->iv of skcipher_request) to > contain the last ciphertext block when the {en,de}crypt operation is done. > This is currently not the case for the CAAM

[PATCH 2/2] crypto: caam - fix gfp allocation flags (part II)

2017-06-19 Thread Horia Geantă
. Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg.c| 7 +++ drivers/crypto/caam/caamalg_qi.c | 10 -- drivers/crypto/caam/caamhash.c | 32 drivers/crypto/caam/caampkc.c| 4 ++-- 4 files changed, 25 inse

[PATCH 1/2] crypto: caam - fix gfp allocation flags (part I)

2017-06-19 Thread Horia Geantă
Link: http://lkml.kernel.org/g/20170602122446.2427-1-da...@sigma-star.at Cc: <sta...@vger.kernel.org> # 4.8+ Reported-by: David Gstir <da...@sigma-star.at> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caamalg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deleti

Re: [RFC PATCH 0/2] crypto: caam - fix cts(cbc(aes)) with CAAM driver

2017-06-16 Thread Horia Geantă
On 6/16/2017 11:00 AM, Herbert Xu wrote: > On Fri, Jun 16, 2017 at 07:57:00AM +0000, Horia Geantă wrote: >> >> Commit 0605c41cc53ca ("crypto: cts - Convert to skcipher") appends >> CRYPTO_TFM_REQ_MAY_BACKLOG to the original crypto request flags for the >> last

Re: [RFC PATCH 0/2] crypto: caam - fix cts(cbc(aes)) with CAAM driver

2017-06-16 Thread Horia Geantă
On 6/15/2017 5:57 PM, Horia Geantă wrote: > On 6/2/2017 3:25 PM, David Gstir wrote: >> Hi! >> >> While testing fscrypt's filename encryption, I noticed that the >> implementation >> of cts(cbc(aes)) is broken when the CAAM hardware crypto driver i

Re: [RFC PATCH 0/2] crypto: caam - fix cts(cbc(aes)) with CAAM driver

2017-06-15 Thread Horia Geantă
On 6/2/2017 3:25 PM, David Gstir wrote: > Hi! > > While testing fscrypt's filename encryption, I noticed that the implementation > of cts(cbc(aes)) is broken when the CAAM hardware crypto driver is enabled. > Some digging showed that the refactoring of crypto/cts.c in v4.8 > (commit

Re: [PATCH v4 04/14] crypto: ecc - don't be selfish on pubkeys

2017-05-28 Thread Horia Geantă
On 5/25/2017 10:18 AM, Tudor Ambarus wrote: > Rename ecdh_make_pub_key() to ecc_make_pub_key(). > This function might as well be used by ecdsa. Where exactly is ecdsa used in the kernel? https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg23235.html Thanks, Horia

Re: [PATCH v2] crypto: talitos: Extend max key length for SHA384/512-HMAC and AEAD

2017-05-02 Thread Horia Geantă
or the > AEAD size for AES256 + HMAC(SHA512). > > Cc: <sta...@vger.kernel.org> # 3.6+ > Fixes: 357fb60502ede ("crypto: talitos - add sha224, sha384 and sha512 to > existing AEAD algorithms") > Signed-off-by: Martin Hicks <m...@bork.org> Acked-by: Horia Geantă <horia.gea...@nxp.com> Thanks, Horia

Re: [PATCH] crypto: talitos: Extend max key length for SHA384/512-HMAC

2017-04-28 Thread Horia Geantă
On 4/27/2017 6:46 PM, Martin Hicks wrote: > > The max keysize for both of these is 128, not 96. Before, with keysizes > over 96, the memcpy in ahash_setkey() would overwrite memory beyond the > key field. > While here, what about aead_setkey()? AFAICT, TALITOS_MAX_KEY_SIZE value has been

Re: [PATCH] crypto: tcrypt: don't disable irqs and wait

2017-04-26 Thread Horia Geantă
t; speed tests do. > > Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> > Reported-by: Ofir Drang <ofir.dr...@arm.com> Reviewed-by: Horia Geantă <horia.gea...@nxp.com> I've also noticed this in CAAM accelerator - spin_unlock_bh() called from caam_jr_enqueue() co

[PATCH 3/5] crypto: caampkc - incapsulate dropping leading zeros into function

2017-04-25 Thread Horia Geantă
From: Radu Alexe <radu.al...@nxp.com> This function will be used into further patches. Signed-off-by: Radu Alexe <radu.al...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caampkc.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH 0/5] crypto: caampkc - extend RSA private key representation

2017-04-25 Thread Horia Geantă
This patch set adds support for the second and third RSA private key representations and extends caampkc to use the fastest key when all related components are present in the private key. Additionally a rsa tcrypt test has been added. Radu Alexe (4): crypto: tcrypt - include rsa test crypto:

[PATCH 2/5] crypto: caampkc - avoid kzalloc(0) in caam_read_raw_data

2017-04-25 Thread Horia Geantă
From: Tudor Ambarus <tudor-dan.amba...@nxp.com> The function returns NULL if buf is composed only of zeros. Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caampkc.c | 2 ++ 1 file changed, 2 i

[PATCH 5/5] crypto: cammpkc - add support for RSA key form 3

2017-04-25 Thread Horia Geantă
elated components are present in the private key. Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Radu Alexe <radu.al...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caampkc.c | 219 ++

[PATCH 4/5] crypto: caampkc - add support for RSA key form 2

2017-04-25 Thread Horia Geantă
; Signed-off-by: Radu Alexe <radu.al...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- drivers/crypto/caam/caampkc.c | 231 ++--- drivers/crypto/caam/caampkc.h | 38 +++ drivers/crypto/caam/pdb.h | 29 ++ drivers/cryp

[PATCH 1/5] crypto: tcrypt - include rsa test

2017-04-25 Thread Horia Geantă
From: Radu Alexe <radu.al...@nxp.com> Signed-off-by: Radu Alexe <radu.al...@nxp.com> Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Signed-off-by: Horia Geantă <horia.gea...@nxp.com> --- crypto/tcrypt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

Re: [PATCH -next] crypto: caam - fix error return code in caam_qi_init()

2017-04-12 Thread Horia Geantă
("crypto: caam - add Queue Interface (QI) backend > support") > Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> Acked-by: Horia Geantă <horia.gea...@nxp.com> Thanks, Horia

Re: [PATCH] crypto: caam - fix JR platform device subsequent (re)creations

2017-04-05 Thread Horia Geantă
On 4/5/2017 5:14 PM, Herbert Xu wrote: > On Mon, Apr 03, 2017 at 06:12:04PM +0300, Horia Geantă wrote: >> The way Job Ring platform devices are created and released does not >> allow for multiple create-release cycles. >> >> JR0 Platform device creation error >> J

<    1   2   3   4   >