[PATCH] Fixing opcode issue on vmx-crypto

2015-08-21 Thread Leonidas S Barbosa
In build time vadduqm opcode is not being mapped correctly. Adding a new map in ppc-xlate to do this. Signed-off-by: Leonidas S Barbosa --- drivers/crypto/vmx/ppc-xlate.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/vmx/ppc-xlate.pl b/drivers/crypto/vmx/ppc-xlate.pl ind

Re: [PATCH 1/2] Fixing vmx-crypto AES-CTR counter bug

2015-08-21 Thread Leonidas S Barbosa
On Fri, Aug 21, 2015 at 03:19:18PM -0400, Paul Gortmaker wrote: > On Fri, Aug 14, 2015 at 9:12 AM, Leonidas S Barbosa > wrote: > > AES-CTR is using a counter 8bytes-8bytes what miss match with > > kernel specs. > > > > In the previous code a vadduwm was done to increment counter. > > Replacing thi

Re: [PATCH 1/2] Fixing vmx-crypto AES-CTR counter bug

2015-08-21 Thread Paul Gortmaker
On Fri, Aug 14, 2015 at 9:12 AM, Leonidas S Barbosa wrote: > AES-CTR is using a counter 8bytes-8bytes what miss match with > kernel specs. > > In the previous code a vadduwm was done to increment counter. > Replacing this for a vadduqm now considering both cases counter > 8-8 bytes and full 16byte

[PATCH v3 2/3] crypto: caam: ctrl: Propagate the real error code

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam Instead of propagating a 'fake' error code, just propagate the real one in the case of caam_drv_identify_clk() failure. Signed-off-by: Fabio Estevam Reviewed-by: Horia Geantă --- Changes since v2: - None drivers/crypto/caam/ctrl.c | 8 1 file changed, 4 insertion

[PATCH v3 3/3] crypto: caam: Use the preferred style for memory allocations

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam >From Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); The preferred form for allocating a zeroed array is the following: p = kcalloc(n, sizeof(...), ...); " ,so do as sugges

[PATCH v3 1/3] crypto: caam: ctrl: Fix the error handling

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam In the error path we should disable the resources that were previously acquired, so fix the error handling accordingly. Signed-off-by: Fabio Estevam --- Changes since v2: - Add a missing "ret = -ENOMEM" drivers/crypto/caam/ctrl.c | 36 +---

Re: [PATCH v2 1/3] crypto: caam: ctrl: Fix the error handling

2015-08-21 Thread Fabio Estevam
On Fri, Aug 21, 2015 at 1:16 PM, Fabio Estevam wrote: > From: Fabio Estevam > > In the error path we should disable the resources that were previously > acquired, so fix the error handling accordingly. > > Signed-off-by: Fabio Estevam > --- > Changes since v1: > - None > > drivers/crypto/caam/c

Re: [PATCH v2 1/3] crypto: caam: ctrl: Fix the error handling

2015-08-21 Thread Horia Geantă
On 8/21/2015 7:16 PM, Fabio Estevam wrote: > From: Fabio Estevam > > In the error path we should disable the resources that were previously > acquired, so fix the error handling accordingly. > > Signed-off-by: Fabio Estevam For the series: Reviewed-by: Horia Geantă Thanks! Horia -- To unsu

[PATCH v2 3/3] crypto: caam: Use the preferred style for memory allocations

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam >From Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); The preferred form for allocating a zeroed array is the following: p = kcalloc(n, sizeof(...), ...); " ,so do as sugges

[PATCH v2 1/3] crypto: caam: ctrl: Fix the error handling

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam In the error path we should disable the resources that were previously acquired, so fix the error handling accordingly. Signed-off-by: Fabio Estevam --- Changes since v1: - None drivers/crypto/caam/ctrl.c | 35 --- 1 file changed, 24 inserti

[PATCH v2 2/3] crypto: caam: ctrl: Propagate the real error code

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam Instead of propagating a 'fake' error code, just propagate the real one in the case of caam_drv_identify_clk() failure. Signed-off-by: Fabio Estevam --- Changes since v1: - None drivers/crypto/caam/ctrl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH] crypto: caam - fix writing to JQCR_MS when using service interface

2015-08-21 Thread Horia Geantă
Most significant part of JQCR (Job Queue Control Register) contains bits that control endianness: ILE - Immediate Little Endian, DWS - Double Word Swap. The bits are automatically set by the Job Queue Controller HW. Unfortunately these bits are cleared in SW when submitting descriptors via the reg

Re: [PATCH 4/4] crypto: caam: ctrl: Use devm_kcalloc()

2015-08-21 Thread Horia Geantă
On 8/21/2015 5:49 PM, Fabio Estevam wrote: > From: Fabio Estevam > >>From Documentation/CodingStyle: > > "The preferred form for allocating a zeroed array is the following: > > p = kcalloc(n, sizeof(...), ...); " > > , so do as suggested. > > Signed-off-by: Fabio Estevam While here, y

[PATCH 3/4] crypto: caam: ctrl: Use the preferred method for devm_kzalloc()

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam >From Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...);" , so do as suggested. Signed-off-by: Fabio Estevam --- drivers/crypto/caam/ctrl.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet

[PATCH 2/4] crypto: caam: ctrl: Propagate the real error code

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam Instead of propagating a 'fake' error code, just propagate the real one in the case of caam_drv_identify_clk() failure. Signed-off-by: Fabio Estevam --- drivers/crypto/caam/ctrl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caa

[PATCH 4/4] crypto: caam: ctrl: Use devm_kcalloc()

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam >From Documentation/CodingStyle: "The preferred form for allocating a zeroed array is the following: p = kcalloc(n, sizeof(...), ...); " , so do as suggested. Signed-off-by: Fabio Estevam --- drivers/crypto/caam/ctrl.c | 5 ++--- 1 file changed, 2 insertions(+),

[PATCH 1/4] crypto: caam: ctrl: Fix the error handling

2015-08-21 Thread Fabio Estevam
From: Fabio Estevam In the error path we should disable the resources that were previously acquired, so fix the error handling accordingly. Signed-off-by: Fabio Estevam --- drivers/crypto/caam/ctrl.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) d

Re: [PATCH 1/2] crypto: skcipher - Add top-level skcipher interface

2015-08-21 Thread Herbert Xu
On Fri, Aug 21, 2015 at 11:24:08AM +0200, Stephan Mueller wrote: > > If I understand the patch set correctly, a caller uses the skcipher API and > the API sets up the synchronous or asynchronous callbacks depending on the > chosen cipher implementation. > > Now, does a caller always need to cre

Re: [PATCH 1/2] crypto: skcipher - Add top-level skcipher interface

2015-08-21 Thread Stephan Mueller
Am Donnerstag, 20. August 2015, 15:21:45 schrieb Herbert Xu: Hi Herbert, >This patch introduces the crypto skcipher interface which aims >to replace both blkcipher and ablkcipher. > >It's very similar to the existing ablkcipher interface. The >main difference is the removal of the givcrypt inter

[patch] crypto: qat - silence a static checker warning

2015-08-21 Thread Dan Carpenter
My static checker assumes that if we are getting numbers as a string using kstrotoint() then that means they come from outside the kernel and are untrustworthy. This may or may not be true in this case, but it seems harmless to add a range check here. Signed-off-by: Dan Carpenter diff --git a/d