[PATCH] staging: ccree: Convert to platform_{get,set}_drvdata()

2017-09-21 Thread sunil . m
ctly pass a struct platform_device. dev_set_drvdata() is redundant and therefore removed. The driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Suniel Mahesh <suni...@techveda.org> --- Note: - Patch was tested and built(ARCH=arm) on next-20170

[PATCH v2] staging: ccree: Convert to platform_{get,set}_drvdata()

2017-09-21 Thread sunil . m
- Note: - Patch was tested and built(ARCH=arm) on next-20170921. No build issues reported, however it was not tested on real hardware. --- drivers/staging/ccree/ssi_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/driver

Re: KPP questions and confusion

2017-09-21 Thread Tudor Ambarus
Hi, Marcel, On 08/03/2017 11:40 AM, Marcel Holtmann wrote: Essentially we do what all other key exchange procedure do. Generate a private/public key pair, give the public key to the other side, run DH with the value from the other side. That Bluetooth SMP knows about the private key is

[RFC PATCH 0/2] let the crypto subsystem generate the ecc privkey

2017-09-21 Thread Tudor Ambarus
That Bluetooth SMP knows about the private key is pointless, since the detection of debug key usage is actually via the public key portion. With this patch set, the Bluetooth SMP will stop keeping a copy of the ecdh private key, except when using debug keys. This way we let the crypto subsystem to

[PATCH] staging:ccree Fix char * array declaration

2017-09-21 Thread Janani Sankara Babu
This patch solves the following warning shown by the checkpatch script Warning: char * array declaration might be better as static const Signed-off-by: Janani Sankara Babu --- drivers/staging/ccree/ssi_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] staging:ccree Fix dont use assignment in if condition

2017-09-21 Thread Janani Sankara Babu
This patch solves the following error shown by checkpatch script ERROR: do not use assignment in if condition Signed-off-by: Janani Sankara Babu --- drivers/staging/ccree/ssi_hash.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH] staging:ccree Fix use BIT macro

2017-09-21 Thread Janani Sankara Babu
This patch is created to solve the following warning shown by the checkpatch script Warning: Replace all occurences of (1< --- drivers/staging/ccree/ssi_cipher.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH 2/6] crypto: talitos - fix hashing

2017-09-21 Thread Christophe Leroy
md5sum on some files gives wrong result Exemple: With the md5sum from libkcapi: c15115c05bad51113f81bdaee735dd09 test With the original md5sum: bbdf41d80ba7e8b2b7be3a0772be76cb test This patch fixes this issue Signed-off-by: Christophe Leroy ---

[PATCH 0/6] crypto: talitos - various fixes

2017-09-21 Thread Christophe Leroy
This serie provide various fixes on the talitos driver. Christophe Leroy (6): crypto: talitos - Don't provide setkey for non hmac hashing algs. crypto: talitos - fix hashing crypto: talitos - fix sha224 crypto: talitos - fix AEAD test failures crypto: talitos - use kzalloc instead of

[PATCH 1/6] crypto: talitos - Don't provide setkey for non hmac hashing algs.

2017-09-21 Thread Christophe Leroy
Today, md5sum fails with error -ENOKEY because a setkey function is set for non hmac hashing algs, see strace output below: mmap(NULL, 378880, PROT_READ, MAP_SHARED, 6, 0) = 0x77f5 accept(3, 0, NULL) = 7 vmsplice(5,

[PATCH 3/6] crypto: talitos - fix sha224

2017-09-21 Thread Christophe Leroy
Kernel crypto tests report the following error at startup [2.752626] alg: hash: Test 4 failed for sha224-talitos [2.757907] : 30 e2 86 e2 e7 8a dd 0d d7 eb 9f d5 83 fe f1 b0 0010: 2d 5a 6c a5 f9 55 ea fd 0e 72 05 22 This patch fixes it Signed-off-by: Christophe Leroy

[PATCH 5/6] crypto: talitos - use kzalloc instead of kmalloc

2017-09-21 Thread Christophe Leroy
Use kzalloc() to zeroize the extended descriptor at allocation and further zeorising Signed-off-by: Christophe Leroy --- drivers/crypto/talitos.c | 23 +-- drivers/crypto/talitos.h | 2 -- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git

Re: [PATCH] crypto: AF_ALG - remove SGL end indicator when chaining

2017-09-21 Thread Stephan Mueller
Am Mittwoch, 20. September 2017, 19:31:33 CEST schrieb Greg KH: Hi Herbert, > On Wed, Sep 20, 2017 at 03:47:46PM +0200, Stephan Mueller wrote: > > Am Mittwoch, 20. September 2017, 10:32:09 CEST schrieb Herbert Xu: > > > > Hi Herbert, > > > > > Hmm, this patch does not apply against the current

[PATCH] staging:ccree Fix avoid externs in .c files

2017-09-21 Thread Janani Sankara Babu
This patch solves the warning shown by the checkpatch script WARNING: externs should be avoided in .c files Signed-off-by: Janani Sankara Babu --- drivers/staging/ccree/ssi_fips_local.c | 14 -- drivers/staging/ccree/ssi_fips_local.h | 13 + 2 files

[PATCH 6/6] crypto: talitos - fix memory corruption on SEC2

2017-09-21 Thread Christophe Leroy
On SEC2, when using the old descriptors type (hmac snoop no afeu) for doing IPsec, the CICV out pointeur points out of the allocated memory. [2.502554] = [2.510740] BUG dma-kmalloc-256 (Not tainted): Redzone

[PATCH] staging: ccree: else is not generally useful after a break or return

2017-09-21 Thread sunil . m
From: Suniel Mahesh <suni...@techveda.org> Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Suniel Mahesh <suni...@techveda.org> --- Note: - Patch was tested and built(ARCH=arm) on next-20170921. No build issues reported.

Re: [PATCH] crypto: talitos - fix hashing

2017-09-21 Thread Herbert Xu
On Wed, Sep 13, 2017 at 12:44:57PM +0200, Christophe Leroy wrote: > md5sum on some files gives wrong result > > Exemple: > > With the md5sum from libkcapi: > c15115c05bad51113f81bdaee735dd09 test > > With the original md5sum: > bbdf41d80ba7e8b2b7be3a0772be76cb test > > This patch fixes this

Re: [PATCH v2 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-21 Thread Herbert Xu
On Mon, Sep 18, 2017 at 02:41:59PM -0500, Josh Poimboeuf wrote: > v2: > - fix performance issues in sha256-avx2-asm.S and sha512-avx2-asm.S > (Eric) > > Many of the x86 crypto functions use RBP as a temporary register. This > breaks frame pointer convention, and breaks stack traces when

Re: [PATCH] crypto: talitos - fix sha224

2017-09-21 Thread Herbert Xu
On Wed, Sep 13, 2017 at 12:44:51PM +0200, Christophe Leroy wrote: > Kernel crypto tests report the following error at startup > > [2.752626] alg: hash: Test 4 failed for sha224-talitos > [2.757907] : 30 e2 86 e2 e7 8a dd 0d d7 eb 9f d5 83 fe f1 b0 > 0010: 2d 5a 6c a5 f9 55 ea

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

2017-09-21 Thread Herbert Xu
On Fri, Sep 01, 2017 at 05:12:59PM +0300, Horia Geantă wrote: > When built using multi_v7_defconfig, driver does not work on LS1021A: > [...] > caam 170.crypto: can't identify CAAM ipg clk: -2 > caam: probe of 170.crypto failed with error -2 > [...] > > It turns out we have to detect at

Re: [PATCH - RESEND] crypto: AF_ALG - remove SGL terminator indicator when chaining

2017-09-21 Thread Herbert Xu
On Thu, Sep 21, 2017 at 10:16:53AM +0200, Stephan Mueller wrote: > The SGL is MAX_SGL_ENTS + 1 in size. The last SG entry is used for the > chaining and is properly updated with the sg_chain invocation. During > the filling-in of the initial SG entries, sg_mark_end is called for each > SG entry.

Re: [PATCH] crypto: AF_ALG - remove SGL end indicator when chaining

2017-09-21 Thread Herbert Xu
On Thu, Sep 21, 2017 at 08:43:28AM +0200, Stephan Mueller wrote: > Am Mittwoch, 20. September 2017, 19:31:33 CEST schrieb Greg KH: > > Hi Herbert, > > > On Wed, Sep 20, 2017 at 03:47:46PM +0200, Stephan Mueller wrote: > > > Am Mittwoch, 20. September 2017, 10:32:09 CEST schrieb Herbert Xu: > > >

Re: [PATCH] crypto: DRBG - fix freeing of resources

2017-09-21 Thread Herbert Xu
On Thu, Sep 14, 2017 at 05:10:28PM +0200, Stephan Müller wrote: > During the change to use aligned buffers, the deallocation code path was > not updated correctly. The current code tries to free the aligned buffer > pointer and not the original buffer pointer as it is supposed to. > > Thus, the

Re: [PATCH] crypto: talitos - Don't provide setkey for non hmac hashing algs.

2017-09-21 Thread Herbert Xu
On Tue, Sep 12, 2017 at 11:03:39AM +0200, Christophe Leroy wrote: > Today, md5sum fails with error -ENOKEY because a setkey > function is set for non hmac hashing algs, see strace output below: > > mmap(NULL, 378880, PROT_READ, MAP_SHARED, 6, 0) = 0x77f5 > accept(3, 0, NULL)

[PATCH - RESEND] crypto: AF_ALG - remove SGL terminator indicator when chaining

2017-09-21 Thread Stephan Mueller
The SGL is MAX_SGL_ENTS + 1 in size. The last SG entry is used for the chaining and is properly updated with the sg_chain invocation. During the filling-in of the initial SG entries, sg_mark_end is called for each SG entry. This is appropriate as long as no additional SGL is chained with the