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

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

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

2015-10-14 Thread Herbert Xu
On Mon, Oct 12, 2015 at 03:52:34PM +0200, 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), which results > in a built

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

2015-10-14 Thread Herbert Xu
On Mon, Oct 12, 2015 at 07:47:03PM +0200, LABBE Corentin wrote: > Using the devm_xxx() managed function to stripdown the error and remove > code. > > Signed-off-by: LABBE Corentin Both applied. Thanks. -- Email: Herbert Xu Home Page:

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

2015-10-14 Thread Daniel Thompson
This patchset introduces a driver for the STM32 hardware random number generator. Herbert: I have assumed the v2 version is *so* badly broken (sorry again for that) that you would probably choose to remove v2 completely and replace it with v3. In a moment I will also

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

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

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

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

Re: [PATCH v3 3/3] crypto: keywrap - add testmgr support

2015-10-14 Thread Herbert Xu
On Mon, Sep 21, 2015 at 08:59:56PM +0200, Stephan Mueller wrote: > > + .iv_out = "\x03\x1f\x6b\xd7\xe6\x1e\x64\x3d", > + }, > +}; This doesn't build. Please fix and resubmit. Thanks, -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto/pkcs7_verify: Fix unaligned access in pkcs7_verify()

2015-10-14 Thread Herbert Xu
On Tue, Oct 13, 2015 at 10:54:01AM -0400, Sowmini Varadhan wrote: > > On sparc, we see unaligned access messages on each modprobe[-r]: > > Kernel unaligned access at TPC[6ad9b4] pkcs7_verify [..] > Kernel unaligned access at TPC[6a5484] crypto_shash_finup [..] > Kernel unaligned access at

Re: [PATCH V3] crypto/nx842: Add CRC and validation support

2015-10-14 Thread Herbert Xu
On Thu, Oct 08, 2015 at 01:45:51PM -0700, Haren Myneni wrote: > > This patch adds CRC generation and validation support for nx-842. > Add CRC flag so that nx842 coprocessor includes CRC during compression > and validates during decompression. > > Also changes in 842 SW compression to append CRC

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

2015-10-14 Thread Herbert Xu
On Mon, Oct 12, 2015 at 09:21:27AM +0100, Daniel Thompson wrote: > 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

[PATCH] hwrng: stm32 - Fix build with CONFIG_PM

2015-10-14 Thread Daniel Thompson
Commit c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG") was inadequately tested (actually it was tested quite hard so incompetent would be a better description that inadequate) and does not compile on platforms with CONFIG_PM set. Fix this. Signed-off-by: Daniel Thompson

[cryptodev:master 62/67] drivers/char/hw_random/stm32-rng.c:163:51: error: 'pdev' undeclared

2015-10-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 62f57d05e287e950c6e1246b1dba08e12985195a commit: c6a97c42e399ad0d639f616e58e13f0b4ae87626 [62/67] hwrng: stm32 - add support for STM32 HW RNG config: i386-allmodconfig (attached as .config)

[PATCH v4 0/8] zram: introduce contextless compression API and use it on zram

2015-10-14 Thread Joonsoo Kim
This patchset introduce contextless compression API and use it on zram in order to support more compression algorithm without more overhead. The reason we need to support vairous compression algorithms is that zram's performance is highly depend on workload and compression algorithm and

Re: [PATCH v4 4/8] crypto/deflate: support contextless compression API

2015-10-14 Thread kbuild test robot
Hi Joonsoo, [auto build test ERROR on next-20151013 -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Joonsoo-Kim/zram-introduce-contextless-compression-API-and-use-it-on-zram/20151014-154649 config: i386

Re: [PATCH v3 1/3] crypto: add key wrapping block chaining mode

2015-10-14 Thread Herbert Xu
On Mon, Sep 21, 2015 at 08:58:23PM +0200, Stephan Mueller wrote: > > +/* > + * Fast forward the SGL to the "end" length minus SEMIBSIZE. > + * The start in the SGL defined by the fast-forward is returned with > + * the walk variable > + */ > +static void crypto_kw_scatterlist_ff(struct

[PATCH v4 3/8] crypto/lz4: support contextless compressiona API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/lz4.c | 77 1 file changed, 67

Re: [PATCH v4 3/8] crypto/lz4: support contextless compressiona API

2015-10-14 Thread kbuild test robot
Hi Joonsoo, [auto build test ERROR on next-20151013 -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Joonsoo-Kim/zram-introduce-contextless-compression-API-and-use-it-on-zram/20151014-154649 config: i386

[PATCH v4 4/8] crypto/deflate: support contextless compression API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/deflate.c | 96 ++-- 1 file changed, 86

[PATCH v4 1/8] crypto/compress: introduce contextless compression and remove unused pcomp

2015-10-14 Thread Joonsoo Kim
Until now, tfm for crypto compression embeds (de)compression context. According to (de)compression algorithm, requirement on context varys but to be safe to use (de)compression API, tfm should be passed to (de)compression API one by one. This causes unbearable overhead in some cases. For example,

[PATCH v4 2/8] crypto/lzo: support contextless compression API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lzo.c | 81 --

[PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
Until now, zram uses compression algorithm through direct call to core algorithm function, but, it has drawback that we need to add compression algorithm manually to zram if needed. Without this work, we cannot utilize various compression algorithms in the system. Moreover, to add new compression

[PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
Now, zram uses contextless compression API and there is no reason to limit compression algorithm through hard-wired string. This patch remove it so enable all contextless compression algorithm in the system. After this patch, available compression algorithm for zram can be retrieved by searching

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

2015-10-14 Thread Linus Walleij
On Mon, Oct 12, 2015 at 10:21 AM, Daniel Thompson wrote: > 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

[PATCH v4 5/8] zram: make stream find and release functions static

2015-10-14 Thread Joonsoo Kim
From: Sergey Senozhatsky Hide (make static) zstrm find and release function and introduce zcomp_compress_begin()/zcomp_compress_end(). We will have begin and end functions around compression (this patch) and decompression (next patch). So the work flow is evolving

[PATCH] crypto: sahara: set array of const as const

2015-10-14 Thread LABBE Corentin
Some array of const char are not set as const. This patch fix that. Signed-off-by: LABBE Corentin --- drivers/crypto/sahara.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index

[PATCH] s390: crypto: replace raw value by their coresponding define

2015-10-14 Thread LABBE Corentin
SHA_MAX_STATE_SIZE is just the number of u32 word for SHA512. So replace the raw value "16" by their meaning (SHA512_DIGEST_SIZE / 4) Signed-off-by: LABBE Corentin --- arch/s390/crypto/sha.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] crypto: x86: Remove duplicate define of SHA1_DIGEST_SIZE

2015-10-14 Thread LABBE Corentin
The sha x86 crypto code use two define for the same thing: NUM_SHA1_DIGEST_WORDS and SHA1_DIGEST_LENGTH Replace them by SHA1_DIGEST_SIZE/4 Signed-off-by: LABBE Corentin --- arch/x86/crypto/sha-mb/sha1_mb.c| 2 +- arch/x86/crypto/sha-mb/sha_mb_ctx.h | 1 -

[PATCH] crypto: n2: set array of const as const

2015-10-14 Thread LABBE Corentin
Some array of const char are not set as const. This patch fix that. Signed-off-by: LABBE Corentin --- drivers/crypto/n2_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index

Re: [PATCH V3] crypto/nx842: Add CRC and validation support

2015-10-14 Thread Haren Myneni
On 10/14/2015 07:30 AM, Dan Streetman wrote: > On Wed, Oct 14, 2015 at 10:27 AM, Herbert Xu > wrote: >> On Thu, Oct 08, 2015 at 01:45:51PM -0700, Haren Myneni wrote: >>> >>> This patch adds CRC generation and validation support for nx-842. >>> Add CRC flag so that

Re: [PATCH v4 4/8] crypto/deflate: support contextless compression API

2015-10-14 Thread kbuild test robot
Hi Joonsoo, [auto build test ERROR on next-20151013 -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Joonsoo-Kim/zram-introduce-contextless-compression-API-and-use-it-on-zram/20151014-154649 config

Re: [PATCH v4 4/8] crypto/deflate: support contextless compression API

2015-10-14 Thread kbuild test robot
Hi Joonsoo, [auto build test ERROR on next-20151013 -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Joonsoo-Kim/zram-introduce-contextless-compression-API-and-use-it-on-zram/20151014-154649 config: m32r

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Sergey Senozhatsky
Hi, On (10/14/15 16:38), Joonsoo Kim wrote: [..] > Creates virtual block devices called /dev/zramX (X = 0, 1, ...). > @@ -18,9 +17,8 @@ config ZRAM > config ZRAM_LZ4_COMPRESS > bool "Enable LZ4 algorithm support" > depends on ZRAM > - select LZ4_COMPRESS > - select

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:29:03AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > static const char * const backends[] = { > > "lzo", > > -#ifdef CONFIG_ZRAM_LZ4_COMPRESS > > "lz4", > > -#endif > > NULL > > }; > > > > static const

Re: [PATCH v3 3/3] crypto: keywrap - add testmgr support

2015-10-14 Thread Herbert Xu
On Wed, Oct 14, 2015 at 08:44:53PM +0200, Stephan Mueller wrote: > > Did you apply the depending patch referenced in the beginning? > > https://lkml.org/lkml/2015/6/16/342 > > I thought I understood you wanted to pull it. If not, I will add the > necessary > code and resubmit. Yes but I want

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:38:41AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > Creates virtual block devices called /dev/zramX (X = 0, 1, ...). > > @@ -18,9 +17,8 @@ config ZRAM > > config ZRAM_LZ4_COMPRESS > > bool "Enable LZ4

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

2015-10-14 Thread Herbert Xu
On Mon, Oct 12, 2015 at 06:53:39PM +0200, LABBE Corentin wrote: > 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

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Sergey Senozhatsky
On (10/15/15 10:07), Joonsoo Kim wrote: [..] > > > if (error) { > > > + crypto_free_ccomp(comp->tfm); > > > kfree(comp); > > > > hm... zcomp_destroy(comp) ? > > It's not possible to use zcomp_destroy() here. It tries to access > field of comp->stream which could be NULL. ah,

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Sergey Senozhatsky
On (10/14/15 16:38), Joonsoo Kim wrote: [..] > @@ -352,6 +352,7 @@ static ssize_t comp_algorithm_show(struct device *dev, > size_t sz; > struct zram *zram = dev_to_zram(dev); > > + deprecated_attr_warn("comp_algorithm"); > down_read(>init_lock); > sz =

Re: [PATCH] hwrng: stm32 - Fix build with CONFIG_PM

2015-10-14 Thread Herbert Xu
On Wed, Oct 14, 2015 at 05:04:55PM +0100, Daniel Thompson wrote: > Commit c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG") > was inadequately tested (actually it was tested quite hard so > incompetent would be a better description that inadequate) and does > not compile on platforms

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 11:05:49AM +0900, Sergey Senozhatsky wrote: > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > @@ -352,6 +352,7 @@ static ssize_t comp_algorithm_show(struct device *dev, > > size_t sz; > > struct zram *zram = dev_to_zram(dev); > > > > +

Re: [PATCH] crypto: Allow drivers to build if COMPILE_TEST is enabled

2015-10-14 Thread Herbert Xu
On Wed, Oct 14, 2015 at 05:03:30AM +0800, kbuild test robot wrote: > Hi Javier, > > [auto build test WARNING on cryptodev/master -- if it's inappropriate base, > please suggest rules for selecting the more suitable base] Javier, please make sure these warnings are fixed before you enable