[PATCH 2/2] crypto: ccp - Improve info reported when an error occurs

2016-09-28 Thread Gary R Hook
Add human readable strings to log messages about CCP errors Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v3.c |3 ++ drivers/crypto/ccp/ccp-dev-v5.c |3 ++ drivers/crypto/ccp/ccp-dev.c| 53 +++

Re: sha1_mb broken

2016-09-28 Thread Megha Dey
Hi Stephan, Could you give me more info on how I could reproduce this issue on my end? Also was this issue there all along? Which is the first kernel version where you see this? Thanks, Megha On Mon, 2016-09-26 at 19:32 +0200, Stephan Mueller wrote: > Am Freitag, 26. August 2016, 03:15:06 CEST

[PATCH v2 2/2] crypto: ccp - Make syslog errors human-readable

2016-09-28 Thread Gary R Hook
Add human-readable strings to log messages about CCP errors Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v3.c |3 ++ drivers/crypto/ccp/ccp-dev-v5.c |3 ++ drivers/crypto/ccp/ccp-dev.c| 53 +++

Re: sha1_mb broken

2016-09-28 Thread Stephan Mueller
Am Mittwoch, 28. September 2016, 11:25:47 CEST schrieb Megha Dey: Hi Megha, > Hi Stephan, > > There was a bug fix: Commit ID : 0851561d (introduced in 4.6-rc5). I use the current cryptodev-2.6 tree. > > Assuming that you are using an older kernel than this one, maybe we are > issuing the

Re: [PATCH 1/2] crypto: ccp - data structure cleanup

2016-09-28 Thread Tom Lendacky
On 09/28/2016 10:49 AM, Gary R Hook wrote: > Change names of data structure instances; add const > keyword where appropriate. > > Signed-off-by: Gary R Hook > --- > drivers/crypto/ccp/ccp-dev-v3.c |2 +- > drivers/crypto/ccp/ccp-dev-v5.c |7 +-- >

[PATCH v2 0/2] Minor CCP driver changes

2016-09-28 Thread Gary R Hook
V2: point a goto statement at the correct label The following series is for miscellaneous small changes. --- Gary R Hook (2): crypto: ccp - clean up data structure crypto: ccp - Make syslog errors human-readable drivers/crypto/ccp/ccp-dev-v3.c |5 +++-

[PATCH 1/2] crypto: ccp - data structure cleanup

2016-09-28 Thread Gary R Hook
Change names of data structure instances; add const keyword where appropriate. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v3.c |2 +- drivers/crypto/ccp/ccp-dev-v5.c |7 +-- drivers/crypto/ccp/ccp-dev.h|6 +++--- drivers/crypto/ccp/ccp-pci.c

[PATCH 3/3] crypto: vmx - Ensure ghash-generic is enabled

2016-09-28 Thread Marcelo Cerri
Add CRYPTO_GHASH as a dependency for vmx_crypto since p8_ghash uses it as the fallback implementation. Signed-off-by: Marcelo Cerri --- drivers/crypto/vmx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/vmx/Kconfig

[PATCH 0/3] Fix crypto/vmx/p8_ghash memory corruption

2016-09-28 Thread Marcelo Cerri
This series fixes the memory corruption found by Jan Stancek in 4.8-rc7. The problem however also affects previous versions of the driver. Marcelo Cerri (3): crypto: ghash-generic - move common definitions to a new header file crypto: vmx - Fix memory corruption caused by p8_ghash crypto:

Re: sha1_mb broken

2016-09-28 Thread Megha Dey
Hi Stephan, There was a bug fix: Commit ID : 0851561d (introduced in 4.6-rc5). Assuming that you are using an older kernel than this one, maybe we are issuing the complete with the wrong pointer, so the original issuer of the request never gets the complete back. If you are using an older

Re: sha1_mb broken

2016-09-28 Thread Stephan Mueller
Am Mittwoch, 28. September 2016, 22:52:46 CEST schrieb Dey, Megha: Hi Megha, see a self contained example code attached. Ciao Stephan sha1_mb.tar.xz Description: application/xz-compressed-tar

RE: sha1_mb broken

2016-09-28 Thread Dey, Megha
-Original Message- From: Stephan Mueller [mailto:smuel...@chronox.de] Sent: Wednesday, September 28, 2016 11:46 AM To: Dey, Megha Cc: linux-crypto@vger.kernel.org; tim.c.c...@linux.intel.com Subject: Re: sha1_mb broken Am Mittwoch, 28. September 2016, 11:25:47

Re: [PATCH 0/3] Fix crypto/vmx/p8_ghash memory corruption

2016-09-28 Thread Anton Blanchard
Hi Marcelo > This series fixes the memory corruption found by Jan Stancek in > 4.8-rc7. The problem however also affects previous versions of the > driver. If it affects previous versions, please add the lines in the sign off to get it into the stable kernels. Anton -- To unsubscribe from this

[PATCH v2 1/2] crypto: ccp - clean up data structure

2016-09-28 Thread Gary R Hook
Change names of data structure instances. Add const keyword where appropriate. Add error handling path. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v3.c |2 +- drivers/crypto/ccp/ccp-dev-v5.c |9 ++--- drivers/crypto/ccp/ccp-dev.h|6 +++---

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-28 Thread Herbert Xu
On Wed, Sep 28, 2016 at 03:40:51AM -0400, Jan Stancek wrote: > > Thanks for clearing up how this works in padlock-sha, but > we are not exactly in same situation with p8_ghash. > > p8_ghash_init_tfm() already updates descsize. Problem in original report > is that without custom

[PATCH] crypto/caam/jr : Unmap region obtained by of_iomap

2016-09-28 Thread Arvind Yadav
From: Arvind Yadav Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav --- drivers/crypto/caam/jr.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-28 Thread Marcelo Cerri
Hi Herbert, On Wed, Sep 28, 2016 at 10:45:49AM +0800, Herbert Xu wrote: > On Tue, Sep 27, 2016 at 04:46:44PM -0300, Marcelo Cerri wrote: > > > > Can you check if the problem occurs with this patch? > > In light of the fact that padlock-sha is the correct example > to follow, you only need to add

Re: [2/2] ath9k: disable RNG by default

2016-09-28 Thread Kalle Valo
miaoqing pan wrote: > From: Miaoqing Pan > > ath9k RNG will dominates all the noise sources from the real HW > RNG, disable it by default. But we strongly recommand to enable > it if the system without HW RNG, especially on embedded systems. >

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-28 Thread Jan Stancek
- Original Message - > From: "Herbert Xu" > To: "Marcelo Cerri" > Cc: "Jan Stancek" , "rui y wang" , > mhce...@linux.vnet.ibm.com, > leosi...@linux.vnet.ibm.com,

Re: [PATCH] crypto: sha1-powerpc: little-endian support

2016-09-28 Thread Marcelo Cerri
Hi Herbert, Any thoughts on this one? -- Regards, Marcelo On Fri, Sep 23, 2016 at 04:31:56PM -0300, Marcelo Cerri wrote: > The driver does not handle endianness properly when loading the input > data. > > Signed-off-by: Marcelo Cerri > --- >

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-28 Thread Herbert Xu
On Wed, Sep 28, 2016 at 09:55:58AM -0300, Marcelo Cerri wrote: > > Great! If we check the descsize every time a fallback tfm is allocated > that should be enough to prevent bigger problems such as memory > corruptions. Yes a check wouldn't hurt. > Can I move ghash_desc_ctx to a header file

[PATCH] crypto: testmgr - add guard to dst buffer for ahash_export

2016-09-28 Thread Jan Stancek
Add a guard to 'state' buffer and warn if its consistency after call to crypto_ahash_export() changes, so that any write that goes beyond advertised statesize (and thus causing potential memory corruption [1]) is more visible. [1] https://marc.info/?l=linux-crypto-vger=147467656516085