Re: [PATCH] crypto: caam: fix error reporting

2014-10-31 Thread Kim Phillips
On Fri, 31 Oct 2014 18:57:33 +0200 Cristian Stoica wrote: > The error code returned by hardware is four bits wide with an expected > zero MSB. A hardware error condition where the error code can get between > 0x8 and 0xf will trigger an out of bound array access on the error > message table. If

[PATCH] crypto: caam: fix error reporting

2014-10-31 Thread Cristian Stoica
The error code returned by hardware is four bits wide with an expected zero MSB. A hardware error condition where the error code can get between 0x8 and 0xf will trigger an out of bound array access on the error message table. This patch fixes the invalid array access following such an error and re

Re: [PATCH] kernel crypto API interface specification

2014-10-31 Thread Stephan Mueller
Am Freitag, 31. Oktober 2014, 10:09:52 schrieb Marek Vasut: Hi Marek, > On Friday, October 31, 2014 at 08:23:53 AM, Herbert Xu wrote: > > On Fri, Oct 31, 2014 at 04:01:04AM +0100, Marek Vasut wrote: > > > I can share the last state of the document I wrote. Currently, > > > it is not possible for

[PATCH 4/4] crypto: caam - add support for givencrypt cbc(aes) and rfc3686(ctr(aes))

2014-10-31 Thread Catalin Vasile
Add support for one-shot givencrypt algorithms. Givencrypt algorithms will generate their IV and encrypt data within the same shared job descriptors. Current algorithms merged from ablkcipher to givencrypt are: - AES Cipher Block Chaining (CBC) - AES Counter Mode (CTR) compliant with RFC3686 Sig

[PATCH 1/4] crypto: caam - add support for ctr(aes)

2014-10-31 Thread Catalin Vasile
Add support for AES working in Counter Mode Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 40 ++- drivers/crypto/caam/desc_constr.h | 2 ++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b

[PATCH 2/4] crypto: caam - add support for rfc3686(ctr(aes))

2014-10-31 Thread Catalin Vasile
Add support for Advanced Encryption Standard (AES) in Counter Mode (CTR) as provided in IPsec implementation standard RFC3686. ablkcipher shared descriptors now save context registers after job execution. This is used to load Nonce specific to RFC3686 only at first execution of shared job descript

[PATCH 3/4] crypto: caam - add support for rfc3686 with authenc md5, sha1 and sha2

2014-10-31 Thread Catalin Vasile
Add support for AES Counter Mode (CTR) compliant with RFC3686 to be used along with authenc algorithms (md5, sha1, sha224, sha256, sha384, sha512) as one-shot aead algorithms. Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 262 +- 1 file

Re: [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator

2014-10-31 Thread Herbert Xu
On Fri, Oct 31, 2014 at 10:57:06AM +0100, Maxime Ripard wrote: > > On a 3.18-rc2 kernel: > > $ git grep kmap -- crypto/ > crypto/ahash.c: walk->data = kmap(walk->pg); > crypto/ahash.c: walk->data = kmap_atomic(walk->pg); > crypto/async_tx/async_memcp

Re: [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator

2014-10-31 Thread Maxime Ripard
On Fri, Oct 31, 2014 at 04:18:03PM +0800, Herbert Xu wrote: > On Fri, Oct 31, 2014 at 09:13:23AM +0100, Maxime Ripard wrote: > > > > I don't understand here. Why would other drivers *not* being affected? > > > > If the scatter list passed by AF_ALG can be in highmem, I guess it's > > the case for

Re: [PATCH] kernel crypto API interface specification

2014-10-31 Thread Marek Vasut
On Friday, October 31, 2014 at 08:23:53 AM, Herbert Xu wrote: > On Fri, Oct 31, 2014 at 04:01:04AM +0100, Marek Vasut wrote: > > I can share the last state of the document I wrote. Currently, > > it is not possible for me to keep up with my workload and do > > anything else, so that's all I can do.

Re: [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator

2014-10-31 Thread Herbert Xu
On Fri, Oct 31, 2014 at 09:13:23AM +0100, Maxime Ripard wrote: > > I don't understand here. Why would other drivers *not* being affected? > > If the scatter list passed by AF_ALG can be in highmem, I guess it's > the case for every driver out there. Almost every kernel code I've > seen so far make

Re: [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator

2014-10-31 Thread Maxime Ripard
On Fri, Oct 31, 2014 at 03:20:30PM +0800, Herbert Xu wrote: > On Thu, Oct 30, 2014 at 06:19:33PM +0100, Maxime Ripard wrote: > > > > > With AF_ALG and cryptodev, the SG is in highmem. Verified with some > > > PageHighMem(). > > > > Then fix AF_ALG and cryptodev, because all of the other drivers mi

Re: [PATCH] kernel crypto API interface specification

2014-10-31 Thread Herbert Xu
On Fri, Oct 31, 2014 at 04:01:04AM +0100, Marek Vasut wrote: > > I can share the last state of the document I wrote. Currently, > it is not possible for me to keep up with my workload and do > anything else, so that's all I can do. Posting your latest revision would be great. Thanks! -- Email: H

Re: [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator

2014-10-31 Thread Herbert Xu
On Thu, Oct 30, 2014 at 06:19:33PM +0100, Maxime Ripard wrote: > > > With AF_ALG and cryptodev, the SG is in highmem. Verified with some > > PageHighMem(). > > Then fix AF_ALG and cryptodev, because all of the other drivers might > be affected. No it's the driver that needs to be fixed. Of cours