[PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-12 Thread Daniel Thompson
Add support for STMicroelectronics STM32 random number generator. The config value defaults to N, reflecting the fact that STM32 is a very low resource microcontroller platform and unlikely to be targeted by any "grown up" defconfigs. Signed-off-by: Daniel Thompson

[PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver

2015-10-12 Thread Daniel Thompson
New bindings and driver have been created for STM32 series parts. This patch integrates this changes. Signed-off-by: Daniel Thompson Acked-by: Maxime Coquelin --- arch/arm/boot/dts/stm32f429.dtsi | 7 +++ 1 file changed, 7

[PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-12 Thread Daniel Thompson
This patchset introduces a driver for the STM32 hardware random number generator. v2: * Moved binding docs from .../hwrng/ to .../rng/ and renamed to match convention in new directory (Rob Herring). * Adopted runtime PM and auto-suspend instead of managing the clocks from the read

[PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings

2015-10-12 Thread Daniel Thompson
This adds documentation of device tree bindings for the STM32 hardware random number generator. Signed-off-by: Daniel Thompson Acked-by: Maxime Coquelin Acked-by: Rob Herring ---

Re: unaligned access in pkcs7_verify

2015-10-12 Thread Herbert Xu
On Thu, Oct 08, 2015 at 10:43:43AM -0400, Sowmini Varadhan wrote: > On (10/08/15 21:15), Herbert Xu wrote: > > > desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); > > > - sinfo->sig.digest_size = digest_size = > > > crypto_shash_digestsize(tfm); > > > +

Re: [PATCH] crypto: mxs-dcp is an stmp device

2015-10-12 Thread Marek Vasut
On Monday, October 12, 2015 at 03:52:34 PM, Arnd Bergmann wrote: > The mxs-dcp driver relies on the stmp_reset_block() helper function, which > is provided by CONFIG_STMP_DEVICE. This symbol is always set on MXS, > but the driver can now also be built for MXC (i.MX6) That is correct. > , which

Re: unaligned access in pkcs7_verify

2015-10-12 Thread David Miller
From: Herbert Xu Date: Mon, 12 Oct 2015 21:32:09 +0800 > The sparc sha algorithms themselves need to declare the alignment > that they require. Currently they claim to be able to handle any > alignment which appears to not be the case. The sparc SHA assembler can

[PATCH] crypto: mxs-dcp is an stmp device

2015-10-12 Thread Arnd Bergmann
The mxs-dcp driver relies on the stmp_reset_block() helper function, which is provided by CONFIG_STMP_DEVICE. This symbol is always set on MXS, but the driver can now also be built for MXC (i.MX6), which results in a built error if no other driver selects STMP_DEVICE: drivers/built-in.o: In

Re: unaligned access in pkcs7_verify

2015-10-12 Thread Sowmini Varadhan
On (10/12/15 21:32), Herbert Xu wrote: > Thanks. We have two bugs here. First of all pkcs7_verify definitely > shouldn't place the structure after the digest without aligning the > pointer. So something like your patch is needed (but please use > alignof instead of sizeof). Also don't put in

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

2015-10-12 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

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

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

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

2015-10-12 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 6/8] crypto: akcipher: the key parameter must be const u8 *

2015-10-12 Thread LABBE Corentin
All cryptoAPI setkey function set the key parameter as const u8 *. This patch make the crypto_akcipher_setkey parameters like others. Signed-off-by: LABBE Corentin --- include/crypto/akcipher.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

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

2015-10-12 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 1/8] crypto: hash: add zero length message hash for shax and md5

2015-10-12 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 --- include/crypto/md5.h | 5 + include/crypto/sha.h | 20

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

2015-10-12 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 3/8] crypto: ccp: Use precalculated hash from headers

2015-10-12 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 | 40 1 file changed, 8 insertions(+), 32 deletions(-) diff --git

[PATCH 1/2] crypto: atmel: use devm_xxx() managed function

2015-10-12 Thread LABBE Corentin
Using the devm_xxx() managed function to stripdown the error and remove code. Signed-off-by: LABBE Corentin --- drivers/crypto/atmel-aes.c | 38 +- drivers/crypto/atmel-sha.c | 27 +--

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

2015-10-12 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. Regards -- To unsubscribe from this

[PATCH 2/2] crypto: ux500: Use devm_xxx() managed function

2015-10-12 Thread LABBE Corentin
Using the devm_xxx() managed function to stripdown the error and remove code. In the same time, we replace request_mem_region/ioremap by the unified devm_ioremap_resource() function. Signed-off-by: LABBE Corentin --- drivers/crypto/ux500/cryp/cryp_core.c | 70

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

2015-10-12 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/20151013-005943 config: arm-mmp

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

2015-10-12 Thread Corentin LABBE
Le 12/10/2015 21:24, kbuild test robot a écrit : > Hi LABBE, > > [auto build test ERROR on crypto/master -- if it's inappropriate base, please > suggest rules for selecting the more suitable base] > > url: >

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

2015-10-12 Thread Tom Lendacky
On 10/12/2015 11:53 AM, LABBE Corentin wrote: Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin Just a minor comment below. Tested-by: Tom Lendacky Acked-by: Tom