Re: Crash in crypto mcryptd

2016-12-01 Thread Eric Biggers
On Thu, Dec 01, 2016 at 05:47:02PM -0800, Tim Chen wrote: > On Thu, 2016-12-01 at 19:00 -0500, Mikulas Patocka wrote: > > Hi > > > > There is a bug in mcryptd initialization. > > > > This is a test module that tries various hash algorithms. When you load  > > the module with "insmod test.ko 'alg=

Re: [patch] crypto: chcr - checking for IS_ERR() instead of NULL

2016-12-01 Thread Harsh Jain
On 02-12-2016 02:19, Dan Carpenter wrote: > The create_hash_wr() function never returns error pointers. It returns > NULL on error. Will fix the same, Thanks > > Fixes: 358961d1cd1e ("crypto: chcr - Added new structure chcr_wr") > Signed-off-by: Dan Carpenter > > diff --git a/drivers/crypto/che

Re: [patch] crypto: chcr - checking for IS_ERR() instead of NULL

2016-12-01 Thread Harsh Jain
On 02-12-2016 11:29, Harsh Jain wrote: > > On 02-12-2016 02:19, Dan Carpenter wrote: >> The create_hash_wr() function never returns error pointers. It returns >> NULL on error. > Will fix the same, Thanks It's a patch mail not bug reporting! Sorry for confusion. You have already fixed it. Than

[PATCH 1/2] Add crypto driver support for some MediaTek chips

2016-12-01 Thread Ryder Lee
This adds support for the MediaTek hardware accelerator on mt7623/mt2701/mt8521p SoC. This driver currently implement: - SHA1 and SHA2 family(HMAC) hash alogrithms. - AES block cipher in CBC/ECB mode with 128/196/256 bits keys. Signed-off-by: Ryder Lee --- drivers/crypto/Kconfig

[PATCH 2/2] crypto: mediatek - add DT bindings documentation

2016-12-01 Thread Ryder Lee
Add DT bindings documentation for the crypto driver Signed-off-by: Ryder Lee --- .../devicetree/bindings/crypto/mediatek-crypto.txt | 32 ++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/mediatek-crypto.txt diff --git a/Documen

[PATCH 0/2] Add MediaTek crypto acclelrator driver

2016-12-01 Thread Ryder Lee
This adds support for the MediaTek hardware accelerator on mt7623 SoC. This driver currently implement: - SHA1 and SHA2 family(HMAC) hash alogrithms. - AES block cipher in CBC/ECB mode with 128/196/256 bits keys. Ryder Lee (2): Add crypto driver support for some MediaTek chips crypto: media

Re: Crash in crypto mcryptd

2016-12-01 Thread Tim Chen
On Thu, 2016-12-01 at 19:00 -0500, Mikulas Patocka wrote: > Hi > > There is a bug in mcryptd initialization. > > This is a test module that tries various hash algorithms. When you load  > the module with "insmod test.ko 'alg=mcryptd(md5)'", the machine crashes. I don't think your test setup is r

Crash in crypto mcryptd

2016-12-01 Thread Mikulas Patocka
Hi There is a bug in mcryptd initialization. This is a test module that tries various hash algorithms. When you load the module with "insmod test.ko 'alg=mcryptd(md5)'", the machine crashes. Mikulas #include #include #include static char *alg = "md5"; module_param_named(alg, alg, charp,

Re: [PATCH 2/3] crypto: brcm: Add Broadcom SPU driver

2016-12-01 Thread kbuild test robot
Hi Rob, [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.9-rc7 next-20161201] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Rob-Rice/crypto-brcm-DT-documentation-for

[patch] crypto: chcr - checking for IS_ERR() instead of NULL

2016-12-01 Thread Dan Carpenter
The create_hash_wr() function never returns error pointers. It returns NULL on error. Fixes: 358961d1cd1e ("crypto: chcr - Added new structure chcr_wr") Signed-off-by: Dan Carpenter diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c index 32361dd..2ed1e24 1006

[bug report] crypto: chcr - Add AEAD algos.

2016-12-01 Thread Dan Carpenter
Hello Harsh Jain, This is a semi-automatic email about new static checker warnings. The patch 2debd3325e55: "crypto: chcr - Add AEAD algos." from Nov 29, 2016, leads to the following Smatch complaint: drivers/crypto/chelsio/chcr_algo.c:2460 chcr_aead_op() warn: variable derefere

Re: [PATCH] crypto: marvell - Don't copy hash operation twice into the SRAM

2016-12-01 Thread Gregory CLEMENT
Hi Romain, On jeu., déc. 01 2016, Romain Perier wrote: > No need to copy the template of an hash operation twice into the SRAM > from the step function. > Does this patch fix a bug ot it is jsute a cleanup/improvement? If it is a bug you should CC stable and add use the Fixes tag. Gregory

[PATCH] crypto: marvell - Don't copy hash operation twice into the SRAM

2016-12-01 Thread Romain Perier
No need to copy the template of an hash operation twice into the SRAM from the step function. Signed-off-by: Romain Perier --- drivers/crypto/marvell/hash.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index 2a92605..fbbcbf8

Re: [PATCH] crypto: arm/aesbs - Select SIMD in Kconfig

2016-12-01 Thread Arnd Bergmann
On Thursday, December 1, 2016 8:56:16 PM CET Herbert Xu wrote: > On Thu, Dec 01, 2016 at 12:47:59AM +0100, Arnd Bergmann wrote: > > Commit 585b5fa63da9 ("crypto: arm/aes - Select SIMD in Kconfig") added > > the dependency for CRYPTO_AES_ARM_CE, but missed the same change > > for CRYPTO_AES_ARM_BS:

Re: [PATCH 1/1] crypto: set error code when kcalloc fails

2016-12-01 Thread Herbert Xu
On Thu, Dec 01, 2016 at 10:04:43AM +0800, Pan Bian wrote: > Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188521. In function > skcipher_recvmsg_async(), variable err takes the return value, and its > value should be negative on failures. Because variable err may be > reassigned and checked b

Re: [PATCH v2] crypto: AF_ALG - fix AEAD AIO handling of zero buffer

2016-12-01 Thread Herbert Xu
On Thu, Dec 01, 2016 at 08:22:37AM +0100, Stephan Mueller wrote: > Hi Herbert, > > I split out the bug fix patch from the AD/tag formatting patch as they most > likely will come after the next merge window. > > ---8<--- > > Handle the case when the caller provided a zero buffer to > sendmsg/sen

Re: [PATCH 1/2] crypto: caam: pass key buffers with typesafe pointers

2016-12-01 Thread Herbert Xu
On Wed, Nov 30, 2016 at 10:01:59PM +0100, Arnd Bergmann wrote: > The 'key' field is defined as a 'u64' and used for two different > pieces of information: either to store a pointer or a dma_addr_t. > The former leads to a build error on 32-bit machines: > > drivers/crypto/caam/caamalg_desc.c: In f

Re: [PATCH 1/4] crypto: api - fix comment typo

2016-12-01 Thread Herbert Xu
On Wed, Nov 30, 2016 at 03:16:08PM +0200, Baruch Siach wrote: > Signed-off-by: Baruch Siach All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH] crypto: arm/aesbs - Select SIMD in Kconfig

2016-12-01 Thread Herbert Xu
On Thu, Dec 01, 2016 at 12:47:59AM +0100, Arnd Bergmann wrote: > Commit 585b5fa63da9 ("crypto: arm/aes - Select SIMD in Kconfig") added > the dependency for CRYPTO_AES_ARM_CE, but missed the same change > for CRYPTO_AES_ARM_BS: > > arch/arm/crypto/aes-arm-bs.o: In function `aesbs_mod_init': > aesb

[PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Gonglei
This patch introduces virtio-crypto driver for Linux Kernel. The virtio crypto device is a virtual cryptography device as well as a kind of virtual hardware accelerator for virtual machines. The encryption anddecryption requests are placed in the data queue and are ultimately handled by thebackend

Re: [PATCH] crypto: caam - fix key pointer size warning

2016-12-01 Thread Herbert Xu
On Tue, Nov 29, 2016 at 10:22:49AM +0200, Horia Geantă wrote: > When building on 32-bit, compiler issues [-Wint-to-pointer-cast] warnings: > > drivers/crypto/caam/caamalg_desc.c: In function 'cnstr_shdsc_aead_null_encap': > drivers/crypto/caam/caamalg_desc.c:67:27: warning: cast to pointer from >

RE: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Gonglei (Arei)
> > On Thu, Dec 01, 2016 at 02:27:19AM +, Gonglei (Arei) wrote: > > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > > > diff --git a/drivers/crypto/virtio/virtio_crypto_algs.c > > > b/drivers/crypto/virtio/virtio_crypto_algs.c > > > > new file mode 100644 > > > > index 000..

[PATCH v5 0/1] virtio-crypto: add Linux driver

2016-12-01 Thread Gonglei
v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virti

RE: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Gonglei (Arei)
> > Subject: Re: [PATCH v4 1/1] crypto: add virtio-crypto driver > > On Thu, Dec 01, 2016 at 02:27:19AM +, Gonglei (Arei) wrote: > > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > > > +static int virtio_crypto_alg_ablkcipher_init_session( > > > > + struct virtio_c

Re: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Stefan Hajnoczi
On Thu, Dec 01, 2016 at 02:27:19AM +, Gonglei (Arei) wrote: > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > > +static int virtio_crypto_alg_ablkcipher_init_session( > > > + struct virtio_crypto_ablkcipher_ctx *ctx, > > > + uint32_t alg, const uint8_t *key, > > >

Re: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Stefan Hajnoczi
On Thu, Dec 01, 2016 at 02:27:19AM +, Gonglei (Arei) wrote: > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > > diff --git a/drivers/crypto/virtio/virtio_crypto_algs.c > > b/drivers/crypto/virtio/virtio_crypto_algs.c > > > new file mode 100644 > > > index 000..08b077f > > > -