[PATCH v5 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-04-12 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar Acked-by: Rob Herring --- Changes in v2: - add clocks to required properties - add Acked-by .../devicetree/bindings/crypto/fsl-imx-scc.txt | 21

[PATCH v5 3/3] crypto: add basic driver for the MXC SCC

2016-04-12 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar --- Changes in v5: - fix bug in mxc_scc_ablkcipher_req_complete call Changes in v4: - copy back IV on exit - rebase to v4.6-rc1 Changes in v3: - don't just unloc

[PATCH v5 2/3] ARM: i.MX25: add scc module to dtsi

2016-04-12 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index 6b1f4bbe6ec6..af6af8741fe5 100644 --- a/arch/arm

[PATCH v4 3/3] crypto: add basic driver for the MXC SCC

2016-04-08 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar --- Changes in v4: - copy back IV on exit - rebase to v4.6-rc1 Changes in v3: - don't just unlock mutex in mxc_scc_ablkcipher_next, but also return, too - replace

[PATCH v4 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-04-08 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar Acked-by: Rob Herring --- Changes in v2: - add clocks to required properties - add Acked-by .../devicetree/bindings/crypto/fsl-imx-scc.txt | 21

[PATCH v4 2/3] ARM: i.MX25: add scc module to dtsi

2016-04-08 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index 6b1f4bbe6ec6..af6af8741fe5 100644 --- a/arch/arm

[PATCH v2 2/3] ARM: i.MX25: add RNGC node to dtsi

2016-03-11 Thread Steffen Trumtrar
Add a devicetree entry for the Random Number Generator Version C (RNGC). Signed-off-by: Steffen Trumtrar --- Changes in v2: - remove interrupt-names from dtsi arch/arm/boot/dts/imx25.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot

[PATCH v2 3/3] hwrng: mxc-fsl - add support for Freescale RNGC

2016-03-11 Thread Steffen Trumtrar
it turns out, the driver for the RNGC works fine on the (at least) i.MX25. So, they seem to be somewhat compatible. Signed-off-by: Steffen Trumtrar --- Changes in v2: - remove irq variable from private struct - move devm_request_irq from mxc_rngc_init to probe - return irq in case of error

[PATCH v2 1/3] Documentation: devicetree: add Freescale RNGC binding

2016-03-11 Thread Steffen Trumtrar
Add binding documentation for the Freescale RNGC found on some i.MX2/3/5 SoCs. Signed-off-by: Steffen Trumtrar --- Documentation/devicetree/bindings/rng/mxc_rngc.txt | 16 1 file changed, 16 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/mxc_rngc.txt

Re: [PATCH 3/3] hwrng: mxc-fsl - add support for Freescale RNGC

2016-03-07 Thread Steffen Trumtrar
Fabio Estevam wrote: > > >> On Mon, Feb 29, 2016 at 12:52 PM, Steffen Trumtrar > > >> wrote: > > >> > > >> > + ret = clk_prepare_enable(rngc->clk); > > >> > + if (ret) > > >> > +

[PATCH v3 3/3] crypto: add basic driver for the MXC SCC

2016-03-07 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar --- Changes in v3: - don't just unlock mutex in mxc_scc_ablkcipher_next, but also return, too - replace mutex with bool to make lockdep happy Changes in v2: - minor cod

[PATCH v3 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-03-07 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar Acked-by: Rob Herring --- Changes in v2: - add clocks to required properties - add Acked-by .../devicetree/bindings/crypto/fsl-imx-scc.txt | 21 + 1

[PATCH v3 2/3] ARM: i.MX25: add scc module to dtsi

2016-03-07 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329e9b9e3..73118aba4cc4 100644 --- a/arch/arm

[PATCH 3/3] hwrng: mxc-fsl - add support for Freescale RNGC

2016-02-29 Thread Steffen Trumtrar
it turns out, the driver for the RNGC works fine on the (at least) i.MX25. So, they seem to be somewhat compatible. Signed-off-by: Steffen Trumtrar --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/mxc-rngc.c | 400

[PATCH 1/3] Documentation: devicetree: add Freescale RNGC binding

2016-02-29 Thread Steffen Trumtrar
Add binding documentation for the Freescale RNGC found on some i.MX2/3/5 SoCs. Signed-off-by: Steffen Trumtrar --- Documentation/devicetree/bindings/rng/mxc_rngc.txt | 16 1 file changed, 16 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/mxc_rngc.txt

[PATCH 2/3] ARM: i.MX25: add RNGC node to dtsi

2016-02-29 Thread Steffen Trumtrar
Add a devicetree entry for the Random Number Generator Version C (RNGC). Signed-off-by: Steffen Trumtrar --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329e9b9e3..ec44ed125057

[PATCH v2 3/3] crypto: add basic driver for the MXC SCC

2016-02-29 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar --- Changes since v1: - minor code cleanups (double newlines, unnecessary parentesis, ...) - mxc_scc_ablkcipher_next: complete request with error before mutex_unlock drivers/c

[PATCH v2 2/3] ARM: i.MX25: add scc module to dtsi

2016-02-29 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329e9b9e3..73118aba4cc4 100644 --- a/arch/arm

[PATCH v2 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-02-29 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar Acked-by: Rob Herring --- Changes since v1: - add clocks to required properties - add Acked-by .../devicetree/bindings/crypto/fsl-imx-scc.txt | 21

Re: [PATCH 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-02-16 Thread Steffen Trumtrar
Hi! Shawn Guo writes: > On Thu, Feb 11, 2016 at 03:04:43PM +0100, Steffen Trumtrar wrote: >> Add documentation for the Freescale Security Controller (SCC) >> found on i.MX25 SoCs. >> >> Signed-off-by: Steffen Trumtrar >> --- >> .../devicetree/bindin

[PATCH 2/3] ARM: i.MX25: add scc module to dtsi

2016-02-11 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329e9b9e3..73118aba4cc4 100644 --- a/arch/arm

[PATCH 3/3] crypto: add basic driver for the MXC SCC

2016-02-11 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar --- drivers/crypto/Kconfig | 9 + drivers/crypto/Makefile | 1 + drivers/crypto/mxc-scc.c | 756 +++ 3 files changed, 766 inser

[PATCH 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-02-11 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/crypto/fsl-imx-scc.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto

Re: [Linux-ima-user] [RFC] i.MX6 CAAM blob generator for IMA/EVM initialization

2016-01-27 Thread Steffen Trumtrar
Hi! Mimi Zohar writes: > On Mon, 2015-11-09 at 16:18 +0100, Steffen Trumtrar wrote: >> Hi! >> >> The RFC Patch attached after this cover letter is mostly for illustration >> purposes, so please don't waste too much time reviewing the code ;-) >> >>

[RFC] i.MX6 CAAM blob generator for IMA/EVM initialization

2015-11-09 Thread Steffen Trumtrar
able to encrypt the secret and store it somewhere - to load the stored secret and decrypt it later - initialize IMA/EVM with the secret Would something like - security/keys/encrypted-keys/encrypted.c be the correct approach? Thanks, Steffen Steffen Trumtrar (1): crypto: caam - add red

[RFC] crypto: caam - add red blobifier

2015-11-09 Thread Steffen Trumtrar
Signed-off-by: Steffen Trumtrar --- drivers/crypto/caam/Kconfig| 9 + drivers/crypto/caam/Makefile | 1 + drivers/crypto/caam/blob_gen.c | 528 + 3 files changed, 538 insertions(+) create mode 100644 drivers/crypto/caam/blob_gen.c diff --git a

Re: [PATCH RFC 01/11] crypto: caam - Add cache coherency support

2015-06-17 Thread Steffen Trumtrar
On Mon, Jun 15, 2015 at 04:52:49PM -0700, Victoria Milhoan wrote: > Freescale i.MX6 ARM platforms do not support hardware cache coherency. This > patch adds cache coherency support to the CAAM driver. > > Signed-off-by: Victoria Milhoan > --- > drivers/crypto/caam/caamhash.c | 28

Re: [PATCH RFC 05/11] crypto: caam - Add cache coherency support to Freescale CAAM scatterlist implementation

2015-06-17 Thread Steffen Trumtrar
On Mon, Jun 15, 2015 at 04:52:53PM -0700, Victoria Milhoan wrote: > Add cache coherency support to the CAAM scatterlist implementation. > > Signed-off-by: Victoria Milhoan > --- > drivers/crypto/caam/sg_sw_sec4.h | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --g

Re: [PATCH RFC 06/11] crypto: caam - Enable MXC devices to select CAAM driver in Kconfig

2015-06-17 Thread Steffen Trumtrar
On Mon, Jun 15, 2015 at 04:52:54PM -0700, Victoria Milhoan wrote: > From: Steve Cornelius > > Allow CAAM to be selected in the kernel for Freescale i.MX6 devices if > ARCH_MXC is enabled. > > Signed-off-by: Steve Cornelius > Signed-off-by: Victoria Milhoan > --- > drivers/crypto/caam/Kconfig

Re: [BUG?] crypto: caam: little/big endianness on ARM vs PPC

2015-06-16 Thread Steffen Trumtrar
Hi! On Tue, Jun 16, 2015 at 03:27:54AM +, Victoria Milhoan wrote: > All, > > Freescale has been adding i.MX6 support to the CAAM driver and testing on > both i.MX6 and QorIQ platforms. The patch series is now available for review. > Your feedback for the provided patches is appreciated. >

[PATCH] crypto: caam - fix non-64-bit write/read access

2015-06-16 Thread Steffen Trumtrar
: Steffen Trumtrar --- This patch is only compile-tested for PowerPC and tested on ARM. According to the datasheets for i.MX6 and P1010 this should be correct, though. drivers/crypto/caam/regs.h | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff

Re: [BUG?] crypto: caam: little/big endianness on ARM vs PPC

2015-06-16 Thread Steffen Trumtrar
Hi! On Mon, Jun 15, 2015 at 05:28:16PM +0100, Russell King - ARM Linux wrote: > On Mon, Jun 15, 2015 at 05:59:07PM +0200, Steffen Trumtrar wrote: > > I'm working on CAAM support for the ARM-based i.MX6 SoCs. The current > > drivers/crypto/caam driver only works for PowerPC

[BUG?] crypto: caam: little/big endianness on ARM vs PPC

2015-06-15 Thread Steffen Trumtrar
r anything else in the jr driver, so maybe that is not optimal. On the other hand the sizeof(..) solution would only catch little endian on 32bit and not big endian (?!) I however don't know what combinations actually *have* to be caught, as I don't know, which exist. So,

Re: Sahara performance on i.MX53

2015-04-27 Thread Steffen Trumtrar
Hi! On Mon, Apr 27, 2015 at 07:16:22PM +0200, Martin Fuzzey wrote: > Hi, > > I've been trying the Sahara crypto module on i.MX53 [mainline 3.19 > kernel + b251638c46a (crypto: sahara - use the backlog)] > > I tested using dm-crypt with AES-128: > cryptsetup -v --key-size=128 luksFormat /dev/mmc

[PATCH 2/2] crypto: sahara - fix AES descriptor create

2015-04-07 Thread Steffen Trumtrar
key is to be set and use the first descriptor for data otherwise. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index

[PATCH 1/2] crypto: sahara - use the backlog

2015-04-07 Thread Steffen Trumtrar
With commit 7e77bdebff5cb1e9876c561f69710b9ab8fa1f7e crypto: af_alg - fix backlog handling in place, the backlog works under all circumstances where it previously failed, atleast for the sahara driver. Use it. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 5 + 1

Re: [PATCH v4 0/4] crypto: sahara - SHA support

2014-12-03 Thread Steffen Trumtrar
On Wed, Dec 03, 2014 at 10:34:16PM +0800, Herbert Xu wrote: > On Mon, Dec 01, 2014 at 01:26:30PM +0100, Steffen Trumtrar wrote: > > Hi! > > > > This series adds support for > > - i.MX53 support > > - SHA1/256 > > to the SAHARA driver. > >

[QUESTION] How is the backlog supposed to be used?

2014-12-01 Thread Steffen Trumtrar
Hi all! I have a question regarding the use of the backlog in a driver using the crypto API. In my driver ("crypto: sahara - SHA support") I had a problem with using the backlog when I am using more than one thread to enqueue the requests and have a queue depth of 1. What happens is, that I run in

[PATCH v4 2/4] crypto: sahara - add support for i.MX53

2014-12-01 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt| 2 +- drivers/crypto/sahara.c | 20 +--- 2 files changed, 18 insertions(+), 4

[PATCH v4 1/4] crypto: sahara - fix spinlock initialization

2014-12-01 Thread Steffen Trumtrar
The driver uses a spinlock, but never initializes it. Fix this. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 164e1ec624e3..6fb16fe7eea5 100644 --- a/drivers/crypto

[PATCH v4 3/4] crypto: sahara - replace tasklets with kthread

2014-12-01 Thread Steffen Trumtrar
mechanism in the queue manager thread. This makes the control flow more obvious and guarantees, that only one request is dequeued until the completion is completed. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 152 +--- 1 file changed

[PATCH v4 4/4] crypto: sahara - add support for SHA1/256

2014-12-01 Thread Steffen Trumtrar
testprogram using AF_ALG with+without upto 128 pthreads on each AES and SHA256 on i.MX53. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 626 +++- 1 file changed, 621 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers

[PATCH v4 0/4] crypto: sahara - SHA support

2014-12-01 Thread Steffen Trumtrar
queued into the device and makes sure that the requests from user-space processes are correctly enqueued into the queue. This means, that the queue is responsible for sequentializing accesses from userspace. - The request is now saved into the sahara_sha_reqctx Regards, Steffen Steffen

[PATCH v3 2/3] crypto: sahara - add support for i.MX53

2014-10-24 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt | 2 +- drivers/crypto/sahara.c | 17 ++--- 2 files changed, 15 insertions(+), 4

[PATCH v3 3/3] crypto: sahara - add support for SHA1/256

2014-10-24 Thread Steffen Trumtrar
testprogram using AF_ALG with+without pthreads on i.MX53. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 712 ++-- 1 file changed, 692 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index

[PATCH v3 0/3] crypto: sahara - SHA1/256 support

2014-10-24 Thread Steffen Trumtrar
Hi! Changes since v2: - added a patch to fix a bug with the spinlock - save the context in the request - made the code threadsafe Regards, Steffen Steffen Trumtrar (3): crypto: sahara - initialize spinlock crypto: sahara - add support for i.MX53 crypto: sahara

[PATCH v3 1/3] crypto: sahara - initialize spinlock

2014-10-24 Thread Steffen Trumtrar
The driver uses a spinlock, but never initializes it. Fix this. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 164e1ec624e3..6fb16fe7eea5 100644 --- a/drivers/crypto

Re: [PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-24 Thread Steffen Trumtrar
Hi! On Fri, Oct 24, 2014 at 09:41:27PM +0800, Herbert Xu wrote: > On Tue, Oct 07, 2014 at 08:47:05AM +0200, Steffen Trumtrar wrote: > > > > > This is still wrong since the context needs to be stored in the > > > request. Otherwise multiple requests will corru

Re: [PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-06 Thread Steffen Trumtrar
Hi! On Tue, Oct 07, 2014 at 10:02:01AM +0800, Herbert Xu wrote: > On Mon, Oct 06, 2014 at 04:43:45PM +0200, Steffen Trumtrar wrote: > > Add support for the MDHA unit in the SAHARA core. > > The MDHA can generate hash digests for MD5 and SHA1 in version 3 and > > additionally

[PATCH v2 0/2] crypto: sahara - SHA1/256 support

2014-10-06 Thread Steffen Trumtrar
Hi! This series adds support for the SAHARA crypto module on i.MX53 in 1/2 and than adds support for SHA1/256 in 2/2. Changes since last version: - save the hash state in the sahara request struct - fixed the hash remainder calculation Regards, Steffen Steffen Trumtrar (2

[PATCH v2 1/2] crypto: sahara - add support for i.MX53

2014-10-06 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt | 2 +- drivers/crypto/sahara.c | 17 ++--- 2 files changed, 15 insertions(+), 4

[PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-06 Thread Steffen Trumtrar
. Signed-off-by: Steffen Trumtrar --- Changes since v1: - save context in the sahara_ctx struct - reworked the scatterlist/remainder calculation drivers/crypto/sahara.c | 689 ++-- 1 file changed, 669 insertions(+), 20 deletions(-) diff

Re: [PATCH 2/2] crypto: sahara - add support for SHA1/256

2014-08-29 Thread Steffen Trumtrar
Hi! On Fri, Aug 29, 2014 at 09:44:42PM +0800, Herbert Xu wrote: > On Mon, Aug 18, 2014 at 03:13:39PM +0200, Steffen Trumtrar wrote: > > > > +struct sahara_sha_reqctx { > > + unsigned int mode; > > + unsigned int digest_size; > > + unsigned

[PATCH 1/2] crypto: sahara - add support for i.MX53

2014-08-18 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt | 2 +- drivers/crypto/sahara.c | 17 ++--- 2 files changed, 15 insertions(+), 4

[PATCH 2/2] crypto: sahara - add support for SHA1/256

2014-08-18 Thread Steffen Trumtrar
. Signed-off-by: Steffen Trumtrar --- drivers/crypto/sahara.c | 637 ++-- 1 file changed, 617 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 85df5b5..05be949 100644 --- a/drivers/crypto/sahara.c +++ b