[PATCH v2] crypto: add precalculated hash for zero message length

2015-10-20 Thread LABBE Corentin
Hello Some crypto drivers cannot process empty data message and so rely on precalculated hash. This patch series add precalculated hash in headers and make the drivers use them. Using those precalculated hash make some additionnal constify patch necessary. Changes since v1: - Added missing

[PATCH 5/8] crypto: akcipher: fix typos in include/crypto/akcipher.h

2015-10-20 Thread LABBE Corentin
Fix numerous spelling error in include/crypto/akcipher.h Signed-off-by: LABBE Corentin --- include/crypto/akcipher.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h index

Re: [PATCH 5/8] crypto: akcipher: fix typos in include/crypto/akcipher.h

2015-10-20 Thread Stephan Mueller
Am Dienstag, 20. Oktober 2015, 09:34:01 schrieb LABBE Corentin: Hi LABBE, >Fix numerous spelling error in include/crypto/akcipher.h > >Signed-off-by: LABBE Corentin >--- > include/crypto/akcipher.h | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-)

[PATCH 4/8] crypto: ux500: Use precalculated hash from headers

2015-10-20 Thread LABBE Corentin
Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin --- drivers/crypto/ux500/hash/hash_core.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git

[PATCH 7/8] crypto: testmgr: Constify tested key/iv/plaintext/digest

2015-10-20 Thread LABBE Corentin
All key/iv/plaintext/digest in testmgr are constant data. Furthermore the testmgr will never modify thoses data. This patch set all members of xxx_testvec as pointer to const. Signed-off-by: LABBE Corentin --- crypto/testmgr.h | 34 +-

[PATCH 2/8] crypto: niagara: Use precalculated hash from headers

2015-10-20 Thread LABBE Corentin
Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin --- drivers/crypto/n2_core.c | 33 ++--- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git

[PATCH 8/8] crypto: testmgr: Use the xxx_zero_message_hash from headers

2015-10-20 Thread LABBE Corentin
Since md5/shaxxx headers have hash for zero message length, just use them. Signed-off-by: LABBE Corentin --- crypto/testmgr.h | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/crypto/testmgr.h b/crypto/testmgr.h index

Re: [PATCH 1/2] crypto/x509: Fix unaligned access in x509_get_sig_params()

2015-10-20 Thread David Howells
Sowmini Varadhan wrote: > x509_get_sig_params() has the same code pattern as the one in > pkcs7_verify() that is fixed by commit 62f57d05e287 ("crypto: pkcs7 - Fix > unaligned access in pkcs7_verify()") so apply a similar fix here: make > sure that desc is pointing

[PATCH 1/8] crypto: hash: add zero length message hash for shax and md5

2015-10-20 Thread LABBE Corentin
Some crypto drivers cannot process empty data message and return a precalculated hash for md5/sha1/sha224/sha256. This patch add thoses precalculated hash in include/crypto. Signed-off-by: LABBE Corentin --- crypto/md5.c| 6 ++ crypto/sha1_generic.c

[PATCH 3/8] crypto: ccp: Use precalculated hash from headers

2015-10-20 Thread LABBE Corentin
Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin --- drivers/crypto/ccp/ccp-ops.c | 39 --- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git

Re: [PATCH] lib/mpi: clean unused SHA1_DIGEST_LENGTH

2015-10-20 Thread Herbert Xu
On Thu, Oct 15, 2015 at 08:34:53PM +0200, LABBE Corentin wrote: > The define SHA1_DIGEST_LENGTH is not used anywhere, so remove it. > > Signed-off-by: LABBE Corentin Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH] hwrng: exynos - Fix unbalanced PM runtime get/puts

2015-10-20 Thread Herbert Xu
On Fri, Oct 16, 2015 at 05:01:51PM +0100, Daniel Thompson wrote: > Currently this driver calls pm_runtime_get_sync() rampantly > but never puts anything back. This makes it impossible for the > device to autosuspend properly; it will remain fully active > after the first use. > > Fix in the

Re: [PATCH] akcipher: Don't #include crypto/public_key.h as the contents aren't used

2015-10-20 Thread Herbert Xu
On Mon, Oct 19, 2015 at 12:19:45PM +0100, David Howells wrote: > Don't #include crypto/public_key.h in akcipher as the contents of the > header aren't used and changes in a future patch cause it to fail to > compile if CONFIG_KEYS=n. > > Signed-off-by: David Howells Patch

Re: [PATCH v2 0/6] Fix CAAM hash driver

2015-10-20 Thread Herbert Xu
On Sun, Oct 18, 2015 at 05:50:47PM +0100, Russell King - ARM Linux wrote: > The following series fixes the CAAM hash driver, allowing it to work > with the previously merged "crypto: ahash - ensure statesize is non- > zero" patch. > > This is non-trivial, because CAAM exports a huge 1600 bytes of

Re: [PATCH 1/2] crypto/x509: Fix unaligned access in x509_get_sig_params()

2015-10-20 Thread Herbert Xu
On Mon, Oct 19, 2015 at 05:23:28PM -0400, Sowmini Varadhan wrote: > x509_get_sig_params() has the same code pattern as the one in > pkcs7_verify() that is fixed by commit 62f57d05e287 ("crypto: pkcs7 - Fix > unaligned access in pkcs7_verify()") so apply a similar fix here: make > sure that desc is

Re: [PATCH v2 1/5] MPI: fix off by one in mpi_read_raw_from_sgl

2015-10-20 Thread Herbert Xu
On Sun, Oct 18, 2015 at 12:45:18PM +0200, Stephan Mueller wrote: > The patch fixes the analysis of the input data which contains an off > by one. > > The issue is visible when the SGL contains one byte per SG entry. > The code for checking for zero bytes does not operate on the data byte. > >

Re: [PATCH] crypto: qat - fix crypto_get_instance_node function

2015-10-20 Thread Herbert Xu
On Fri, Oct 16, 2015 at 11:40:56AM -0700, Tadeusz Struk wrote: > qat_crypto_get_instance_node function needs to handle situation when the > first dev in the list is not started. > > Signed-off-by: Tadeusz Struk Patch applied. Thanks. -- Email: Herbert Xu

Re: [PATCH 00/18] crypto: further fixes for Marvell CESA hash

2015-10-20 Thread Herbert Xu
On Sun, Oct 18, 2015 at 05:16:49PM +0100, Russell King - ARM Linux wrote: > Following on from the previous series, this series addresses further > problems with the Marvell CESA hash driver found while testing it my > openssl/ssh scenarios. > > The first patch improves one from the previous

Re: [PATCH 0/4] hwrng: exynos - Add Device Tree support

2015-10-20 Thread Herbert Xu
On Mon, Oct 19, 2015 at 01:37:38PM +0900, Krzysztof Kozlowski wrote: > Hi, > > The patchset fixes known issues in Exynos hardware random number > generator and adds Device Tree support for it. > > The device was tested on Trats2 board (Exynos4412). It should work > on other Exynos4 and Exynos5

Re: [PATCH 0/6] Sparse related fixes

2015-10-20 Thread Herbert Xu
On Sun, Oct 18, 2015 at 06:30:39PM +0100, Russell King - ARM Linux wrote: > Continuing on from the previous set of 18 patches, I also fixed a > number of sparse problems and other cleanups. I don't deem these > suitable for -rc merging, especially now that we're basically at > -rc6. > > The

[PATCH] crypto: sun4i-ss: add missing statesize

2015-10-20 Thread LABBE Corentin
sun4i-ss implementaton of md5/sha1 is via ahash algorithms. A recent change make impossible to load them without giving statesize. This patch specifiy statesize for sha1 and md5. Signed-off-by: LABBE Corentin --- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++ 1 file

Re: [PATCH v2 0/6] Fix CAAM hash driver

2015-10-20 Thread Victoria Milhoan
On Sun, 18 Oct 2015 17:50:47 +0100 Russell King - ARM Linux wrote: > The following series fixes the CAAM hash driver, allowing it to work > with the previously merged "crypto: ahash - ensure statesize is non- > zero" patch. > > This is non-trivial, because CAAM exports a

[PATCH] crypto: qat - when stopping all devices make fure VF are stopped first

2015-10-20 Thread Tadeusz Struk
When stopping all devices make sure VFs are stopped before the corresponding PF. VFs will always be after PF so just need to loop back. Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_ctl_drv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 4/8] crypto: ux500: Use precalculated hash from headers

2015-10-20 Thread kbuild test robot
Hi LABBE, [auto build test ERROR on crypto/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/LABBE-Corentin/crypto-hash-add-zero-length-message-hash-for-shax-and-md5/20151020-154222 config: arm