Re: [PATCH] crypto: reorder paes test lexicographically

2018-05-17 Thread Corentin Labbe
for hardware keys") > Reported-by: Abdul Haleem <abdha...@linux.vnet.ibm.com> > Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Tested-by: Corentin Labbe <clabbe.montj...@gmail.com> Thanks

Re: [PATCH] crypto: caam: - Use kmemdup() function

2018-04-16 Thread Corentin Labbe
On Mon, Apr 16, 2018 at 11:05:14AM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > Use kmemdup() rather than duplicating its implementation. > > Detected with Coccinelle script. > > Signed-off-by: Fabio Estevam > --- >

Re: [PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests

2018-02-16 Thread Corentin Labbe
On Thu, Feb 15, 2018 at 11:51:00PM +0800, Herbert Xu wrote: > On Fri, Jan 26, 2018 at 08:15:28PM +0100, Corentin Labbe wrote: > > Hello > > > > The current crypto_engine support only ahash and ablkcipher request. > > My first patch which try to add skcipher was N

Re: [PATCH 1/2] sun4i_ss_prng: fix return value of sun4i_ss_prng_generate

2018-02-07 Thread Corentin Labbe
On Wed, Feb 07, 2018 at 11:52:01AM +0100, Artem Savkov wrote: > On Wed, Feb 07, 2018 at 10:56:59AM +0100, Corentin Labbe wrote: > > On Tue, Feb 06, 2018 at 10:20:21PM +0100, Artem Savkov wrote: > > > According to crypto/rng.h generate function should return 0 on success >

Re: [PATCH 1/2] sun4i_ss_prng: fix return value of sun4i_ss_prng_generate

2018-02-07 Thread Corentin Labbe
On Tue, Feb 06, 2018 at 10:20:21PM +0100, Artem Savkov wrote: > According to crypto/rng.h generate function should return 0 on success > and < 0 on error. > > Fixes: b8ae5c7387ad ("crypto: sun4i-ss - support the Security System PRNG") > Signed-off-by: Artem Savkov > --- >

[PATCH v2 1/6] Documentation: crypto: document crypto engine API

2018-01-26 Thread Corentin Labbe
Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- Documentation/crypto/crypto_engine.rst | 48 ++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/crypto/crypto_engine.rst diff --git a/Documentation/crypto/crypto_engine.

[PATCH v2 6/6] crypto: stm32-cryp: convert to the new crypto engine API

2018-01-26 Thread Corentin Labbe
This patch convert the stm32-cryp driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Tested-by: Fabien Dessenne <fabien.desse...@st.com> --- drivers/crypto/stm32/stm32-cryp.c | 29 + 1 file changed, 21 inse

[PATCH v2 4/6] crypto: virtio: convert to new crypto engine API

2018-01-26 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/virtio/virtio_crypto_algs.c | 16 ++-- drivers/crypto/virtio/virtio_crypto_common.h | 3 +-- drivers/crypto/virtio/virtio_crypto_core.c

[PATCH v2 3/6] crypto: omap: convert to new crypto engine API

2018-01-26 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/omap-aes.c | 21 +++-- drivers/crypto/omap-aes.h | 3 +++ drivers/crypto/omap-des.c | 24 ++-- 3 files chang

[PATCH v2 5/6] crypto: stm32-hash: convert to the new crypto engine API

2018-01-26 Thread Corentin Labbe
This patch convert the stm32-hash driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Tested-by: Fabien Dessenne <fabien.desse...@st.com> --- drivers/crypto/stm32/stm32-hash.c | 20 +--- 1 file changed, 13 insertions(+),

[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests

2018-01-26 Thread Corentin Labbe
crypto_transfer_xxx_request_to_engine functions Corentin Labbe (6): Documentation: crypto: document crypto engine API crypto: engine - Permit to enqueue all async requests crypto: omap: convert to new crypto engine API crypto: virtio: convert to new crypto engine API crypto: stm32-hash: convert to the new

[PATCH v2 2/6] crypto: engine - Permit to enqueue all async requests

2018-01-26 Thread Corentin Labbe
The crypto engine could actually only enqueue hash and ablkcipher request. This patch permit it to enqueue any type of crypto_async_request. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Tested-by: Fabien Dessenne <fabien.desse...@st.com> --- crypto/crypto_eng

[PATCH] sparc64: fix typo in CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64

2018-01-23 Thread Corentin Labbe
This patch fixes the typo CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64 Fixes: 81658ad0d923 ("sparc64: Add CAMELLIA driver making use of the new camellia opcodes.") Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- arch/sparc/crypto/Makefile | 2 +-

[BUG] skcipher: Test 1 failed (invalid result) on encryption for cts(virtio_crypto_aes_cbc)

2018-01-18 Thread Corentin Labbe
Hello When modprobing tcrypt on a qemu virtual machine, I get the following trace in dmesg: skcipher: Test 1 failed (invalid result) on encryption for cts(virtio_crypto_aes_cbc) Regards Corentin Labbe

[PATCH] crypto: artpec6 - remove select on non-existing CRYPTO_SHA384

2018-01-17 Thread Corentin Labbe
Since CRYPTO_SHA384 does not exists, Kconfig should not select it. Anyway, all SHA384 stuff is in CRYPTO_SHA512 which is already selected. Fixes: a21eb94fc4d3i ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver") Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> ---

[PATCH 1/2] crypto: Implement a generic crypto statistics

2018-01-11 Thread Corentin Labbe
This patch implement a generic way to get statistics about all crypto usages. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- crypto/Kconfig | 11 crypto/ablkcipher.c | 9 +++ crypto/acompress.c | 9 +++ crypto/

[PATCH 2/2] crypto: tools: Add cryptostat userspace

2018-01-11 Thread Corentin Labbe
Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- tools/crypto/getstat.c | 283 + 1 file changed, 283 insertions(+) create mode 100644 tools/crypto/getstat.c diff --git a/tools/crypto/getstat.c b/tools/crypto/getstat.c new file mode

[PATCH 0/2] crypto: Implement generic crypto statistics

2018-01-11 Thread Corentin Labbe
tlink) instead of /sys - Use atomic_t instead of unsigned long - moved stat code into dedicated inline function - spelling fixes Corentin Labbe (2): crypto: Implement a generic crypto statistics crypto: tools: Add cryptostat userspace crypto/Kconfig | 11 ++ crypto/ablkcipher.c

Re: [PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-11 Thread Corentin Labbe
On Thu, Jan 11, 2018 at 09:17:10AM +, Gilad Ben-Yossef wrote: > Add CryptoCell ablkcipher support > Hello I have some minor comments: ablkcipher is deprecated, so you need to use skcipher instead. > Signed-off-by: Gilad Ben-Yossef > --- >

Re: [PATCH 1/6] Documentation: crypto: document crypto engine API

2018-01-10 Thread Corentin Labbe
y ?). I didn't add aead (and kpp/acompress), since I do not have any way to test it. Since you have a way to test aead, I will add it to the next release. Regards > > On 03/01/18 21:11, Corentin Labbe wrote: > > Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> > > --

[PATCH 1/6] Documentation: crypto: document crypto engine API

2018-01-03 Thread Corentin Labbe
Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- Documentation/crypto/crypto_engine.rst | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/crypto/crypto_engine.rst diff --git a/Documentation/crypto/crypto_engine.

[PATCH 0/6] crypto: engine - Permit to enqueue all async requests

2018-01-03 Thread Corentin Labbe
crypto_engine_op functions from crypto_async_request to void* - Reintroduced crypto_transfer_xxx_request_to_engine functions Corentin Labbe (6): Documentation: crypto: document crypto engine API crypto: engine - Permit to enqueue all async requests crypto: omap: convert to new crypto engine API crypto

[PATCH 2/6] crypto: engine - Permit to enqueue all async requests

2018-01-03 Thread Corentin Labbe
The crypto engine could actually only enqueue hash and ablkcipher request. This patch permit it to enqueue any type of crypto_async_request. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c | 230 i

[PATCH 4/6] crypto: virtio: convert to new crypto engine API

2018-01-03 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/virtio/virtio_crypto_algs.c | 10 +++--- drivers/crypto/virtio/virtio_crypto_common.h | 3 +-- drivers/crypto/virtio/virtio_crypto_core.c | 3

[PATCH 3/6] crypto: omap: convert to new crypto engine API

2018-01-03 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/omap-aes.c | 17 + drivers/crypto/omap-aes.h | 3 +++ drivers/crypto/omap-des.c | 20 3 files changed, 32 inse

[PATCH 5/6] crypto: stm32-hash: convert to the new crypto engine API

2018-01-03 Thread Corentin Labbe
This patch convert the stm32-hash driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/stm32/stm32-hash.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/stm32/stm32-has

[PATCH 6/6] crypto: stm32-cryp: convert to the new crypto engine API

2018-01-03 Thread Corentin Labbe
This patch convert the stm32-cryp driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/stm32/stm32-cryp.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/stm32/stm32-cry

Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-12-22 Thread Corentin Labbe
On Fri, Dec 22, 2017 at 08:06:03PM +1100, Herbert Xu wrote: > On Fri, Dec 22, 2017 at 09:41:48AM +0100, Corentin Labbe wrote: > > > > It's you that was suggesting using crypto_async_request: > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1474434.ht

Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-12-22 Thread Corentin Labbe
On Fri, Dec 22, 2017 at 05:57:24PM +1100, Herbert Xu wrote: > On Wed, Nov 29, 2017 at 09:41:18AM +0100, Corentin Labbe wrote: > > The crypto engine could actually only enqueue hash and ablkcipher request. > > This patch permit it to enqueue any type of crypto_async_request. >

[PATCH RFC 2/3] crypto: Implement a generic crypto statistics

2017-12-20 Thread Corentin Labbe
This patch implement a generic way to get statistics about all crypto usages. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- crypto/Kconfig | 11 +++ crypto/ahash.c | 18 + crypto/algapi.c

[PATCH RFC 1/3] crypto: Prevent to register duplicate cra_driver_name

2017-12-20 Thread Corentin Labbe
me (crypto_alg_match() in crypto/crypto_user.c) will get only the first one found. So this patch prevent the registration of two implementation with the same cra_driver_name. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- crypto/algapi.c | 5 + 1 file changed, 5 insertio

[PATCH RFC 3/3] crypto: tools: Add cryptostat userspace

2017-12-20 Thread Corentin Labbe
Add an example tool for getting easily crypto statistics. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- tools/crypto/cryptostat | 40 1 file changed, 40 insertions(+) create mode 100755 tools/crypto/cryptostat diff --git a/tools/

[PATCH RFC 0/3] crypto: Implement a generic crypto statistics

2017-12-20 Thread Corentin Labbe
bytes 5036 sha512-generic (hash) sha512 Hash: 24bytes 5036 zlib-deflate-scomp (compress) zlib-deflate Compress: 2 bytes 261 Decompress: 4 bytes 345 Note that this patch could be a starting base for a /proc/crypto replacement. Please let me know your opinio

[PATCH] crypto: stm32 - Use standard CONFIG name

2017-12-20 Thread Corentin Labbe
All hardware crypto devices have their CONFIG names using the following convention: CRYPTO_DEV_name_algo This patch apply this conventions on STM32 CONFIG names. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- drivers/crypto/stm32/Kconfig | 6 +++--- drivers/crypto/stm32/Makefi

[PATCH] staging: ccree: fix __dump_byte_array() declaration mismatch

2017-12-20 Thread Corentin Labbe
("staging: ccree: turn compile time debug log to params") Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- drivers/staging/ccree/ssi_driver.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ss

[PATCH 2/2] crypto: seqiv - Remove unused alg/spawn variable

2017-12-12 Thread Corentin Labbe
This patch remove two unused variable and some dead "code" using it. Fixes: 92932d03c2b3 ("crypto: seqiv - Remove AEAD compatibility code") Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- crypto/seqiv.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 1/2] crypto: echainiv - Remove unused alg/spawn variable

2017-12-12 Thread Corentin Labbe
This patch remove two unused variable and some dead "code" using it. Fixes: 66008d4230f6 ("crypto: echainiv - Remove AEAD compatibility code") Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- crypto/echainiv.c | 5 - 1 file changed, 5 deletions(-) diff -

Re: [PATCH] crypto: artpec6: set correct iv size for gcm(aes)

2017-12-12 Thread Corentin Labbe
On Tue, Dec 12, 2017 at 12:20:20PM +0100, Lars Persson wrote: > The IV size should not include the 32 bit counter. Because we had the > IV size set as 16 the transform only worked when the IV input was zero > padded. > > Fixes: a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator >

Re: [PATCH RFC 0/4] crypto: engine - Permit to enqueue all async requests

2017-12-07 Thread Corentin Labbe
pe that this proposal is fine for > Herbert too. > Thanks for your test, I hope other maintainer will test it also. Regards Corentin Labbe

Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-12-07 Thread Corentin Labbe
On Wed, Dec 06, 2017 at 11:02:23AM +, Fabien DESSENNE wrote: > > > On 29/11/17 09:41, Corentin Labbe wrote: > > The crypto engine could actually only enqueue hash and ablkcipher request. > > This patch permit it to enqueue any type of crypto_async_request. > >

[PATCH] crypto: stm32: fix module device table name

2017-11-30 Thread Corentin Labbe
replace sti_dt_ids with stm32_dt_ids which is just declared before. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/stm32/stm32-cryp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32

[PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-11-29 Thread Corentin Labbe
The crypto engine could actually only enqueue hash and ablkcipher request. This patch permit it to enqueue any type of crypto_async_request. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c | 188 +++- i

[PATCH RFC 2/4] crypto: omap: convert to new crypto engine API

2017-11-29 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/omap-aes.c | 21 +++-- drivers/crypto/omap-aes.h | 3 +++ drivers/crypto/omap-des.c | 24 ++-- 3 files chang

[PATCH RFC 3/4] crypto: virtio: convert to new crypto engine API

2017-11-29 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/virtio/virtio_crypto_algs.c | 15 ++- drivers/crypto/virtio/virtio_crypto_common.h | 2 +- drivers/crypto/virtio/virtio_crypto_core.c

[PATCH RFC 4/4] crypto: stm32: convert to the new crypto engine API

2017-11-29 Thread Corentin Labbe
This patch convert the driver to the new crypto engine API. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/stm32/stm32-hash.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/d

[PATCH RFC 0/4] crypto: engine - Permit to enqueue all async requests

2017-11-29 Thread Corentin Labbe
driver. Regards [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1474434.html Corentin Labbe (4): crypto: engine - Permit to enqueue all async requests crypto: omap: convert to new crypto engine API crypto: virtio: convert to new crypto engine API crypto: stm32: convert

[PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-24 Thread Corentin Labbe
When a cipher fails to register in aes_init(), the error path goes thought aes_exit() then crypto_unregister_skciphers(). Since aes_exit calls also crypto_unregister_skcipher, this triggers a refcount_t: underflow; use-after-free. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- C

[PATCH] crypto: arm64/aes - do not call crypto_unregister_skcipher twice on error

2017-11-22 Thread Corentin Labbe
When a cipher fail to register in aes_init(), the error path go thought aes_exit() then crypto_unregister_skciphers(). Since aes_exit calls also crypto_unregister_skcipher, this trigger a refcount_t: underflow; use-after-free. Signed-off-by: Corentin Labbe <cla...@baylibre.com> --- arch

Re: [PATCH v5 2/2] crypto: stm32 - Support for STM32 CRYP crypto module

2017-10-22 Thread Corentin Labbe
On Thu, Oct 19, 2017 at 05:10:30PM +0200, Fabien Dessenne wrote: > This module registers block cipher algorithms that make use of the > STMicroelectronics STM32 crypto "CRYP1" hardware. > The following algorithms are supported: > - aes: ecb, cbc, ctr > - des: ecb, cbc > - tdes: ecb, cbc > >

Re: [PATCH v4 2/2] crypto: stm32 - Support for STM32 CRYP crypto module

2017-10-22 Thread Corentin Labbe
update? (I had to remove the AEAD part of this new driver > since it depends on that pending update) No plan, I do not like the Herbert proposal, so it is a bit hard to progress on it. > > BR > > Fabien > > > On 19/10/17 12:34, Corentin Labbe wrote: > > Hello >

Re: [PATCH v4 2/2] crypto: stm32 - Support for STM32 CRYP crypto module

2017-10-19 Thread Corentin Labbe
Hello I have some minor comment below On Thu, Oct 19, 2017 at 11:03:59AM +0200, Fabien Dessenne wrote: > This module registers block cipher algorithms that make use of the > STMicroelectronics STM32 crypto "CRYP1" hardware. > The following algorithms are supported: > - aes: ecb, cbc, ctr > -

[PATCH] block: cryptoloop - Fix build warning

2017-09-25 Thread Corentin Labbe
This patch fix the following build warning: drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/block/cryptoloop.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH] crypto: bcm: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/bcm/cipher.c | 7 ++- 1 file changed, 2 insertions

[PATCH] crypto: omap: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/omap-aes.c | 7 ++- drivers/crypto/omap-des.

[PATCH] crypto: stm32: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/stm32/stm32-hash.c | 7 ++- 1 file changed, 2 insertions

[PATCH 00/11] crypto: gcm - add GCM IV size constant

2017-08-22 Thread Corentin Labbe
Many GCM users use directly GCM IV size instead of using some constant. This patch add all IV size constant used by GCM and convert drivers for using them.. Corentin Labbe (11): crypto: gcm - add GCM iv size constant crypto: caam - Use GCM IV size constant crypto: ccp - Use GCM IV size

[PATCH 02/11] crypto: caam - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/caam/caamalg.c | 10 +- drivers/crypto/caam/compat.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/crypt

[PATCH 01/11] crypto: gcm - add GCM IV size constant

2017-08-22 Thread Corentin Labbe
Many GCM users use directly GCM IV size instead of using some constant. This patch add all IV size constant used by GCM. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- include/crypto/gcm.h | 8 1 file changed, 8 insertions(+) create mode 100644 include/crypto

[PATCH 03/11] crypto: ccp - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/ccp/ccp-crypto-aes-galois.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/ccp/ccp-crypto-aes-galois.c b/d

[PATCH 06/11] crypto: bcm - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/bcm/cipher.c | 8 drivers/crypto/bcm/cipher.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/bcm/ciph

[PATCH 05/11] crypto: atmel - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/atmel-aes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c

[PATCH 10/11] crypto: gcm - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/gcm.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index 3841b5eafa7e..80cf6c

[PATCH 11/11] crypto: aesni - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- arch/x86/crypto/aesni-intel_glue.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto

[PATCH 09/11] crypto: omap - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/omap-aes-gcm.c | 7 --- drivers/crypto/omap-aes.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/om

[PATCH 08/11] crypto: chelsio - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/chelsio/chcr_algo.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/c

[PATCH 04/11] crypto: nx - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/nx/nx-aes-gcm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/nx/nx-aes-gcm.c b/drivers/crypto/nx/nx-aes

[PATCH 07/11] crypto: mediatek - Use GCM IV size constant

2017-08-22 Thread Corentin Labbe
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/mediatek/mtk-aes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/mediatek/mtk-aes.c b/drivers/crypto/mediat

[PATCH v4 0/1] crypto: engine - Permit to enqueue skcipher request

2017-08-18 Thread Corentin Labbe
for finding request type according to its cra_type Changes since v1 - Aligned to column struct *dev in include - Added missing mutex_unlock in crypto_engine_start() Corentin Labbe (1): crypto: engine - Permit to enqueue skcipher request crypto/crypto_engine.c | 120

[PATCH v4 1/1] crypto: engine - Permit to enqueue skcipher request

2017-08-18 Thread Corentin Labbe
The crypto engine could actually only enqueue hash and ablkcipher request. This patch permit it to enqueue skcipher requests by adding all necessary functions. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c

Re: [PATCH 2/3] crypto: engine - find request type with cra_type

2017-08-18 Thread Corentin Labbe
On Fri, Aug 18, 2017 at 04:28:37PM +0800, Herbert Xu wrote: > On Mon, Aug 14, 2017 at 03:17:24PM +0200, Corentin Labbe wrote: > > The current method for finding request type is based on crypto_tfm_alg_type. > > > > But in case of skcipher, it is the same than ablkciphe

Re: [PATCH 2/3] crypto: engine - find request type with cra_type

2017-08-16 Thread Corentin Labbe
lkcipher which is obsolete and you need to convert to skcipher. regards Corentin Labbe

[PATCH 1/3] crypto: skcipher - export crypto_skcipher_type2

2017-08-14 Thread Corentin Labbe
This patch export crypto_skcipher_type2 like others cra_type Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/skcipher.c | 3 ++- include/crypto/algapi.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/skcipher.c b/crypto/skcipher.c

[PATCH 2/3] crypto: engine - find request type with cra_type

2017-08-14 Thread Corentin Labbe
The current method for finding request type is based on crypto_tfm_alg_type. But in case of skcipher, it is the same than ablkcipher. Using cra_type for this work permits to make the distinction between the two. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> ---

[PATCH 3/3] crypto: engine - Permit to enqueue skcipher request

2017-08-14 Thread Corentin Labbe
The crypto engine could actually only enqueue hash and ablkcipher request. This patch permit it to enqueue skcipher requets by adding all necessary functions. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c

[PATCH 0/3 v3] crypto: engine - Permit to enqueue skcipher request

2017-08-14 Thread Corentin Labbe
struct *dev in include - Added missing mutex_unlock in crypto_engine_start() Corentin Labbe (3): crypto: skcipher - export crypto_skcipher_type2 crypto: engine - find request type with cra_type crypto: engine - Permit to enqueue skcipher request crypto/crypto_engine.c | 133

[PATCH] crypto: cavium - add release_firmware to all return case

2017-08-14 Thread Corentin Labbe
Two return case misses to call release_firmware() and so leak some memory. This patch create a fw_release label (and so a common error path) and use it on all return case. Detected by CoverityScan, CID#1416422 ("Resource Leak") Signed-off-by: Corentin Labbe <clabbe.montj

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-08-09 Thread Corentin Labbe
On Fri, Jul 28, 2017 at 05:01:19PM +0200, Corentin Labbe wrote: > On Fri, Jul 28, 2017 at 09:52:57PM +0800, Herbert Xu wrote: > > On Fri, Jul 14, 2017 at 01:15:36PM +0200, Corentin Labbe wrote: > > > On Fri, Jun 23, 2017 at 02:48:37PM +0800, Herbert Xu wrote: > > > >

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-07-28 Thread Corentin Labbe
On Fri, Jul 28, 2017 at 09:52:57PM +0800, Herbert Xu wrote: > On Fri, Jul 14, 2017 at 01:15:36PM +0200, Corentin Labbe wrote: > > On Fri, Jun 23, 2017 at 02:48:37PM +0800, Herbert Xu wrote: > > > On Mon, Jun 19, 2017 at 09:55:24AM +0200, Corentin Labbe wrote: > > > &g

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-07-14 Thread Corentin Labbe
On Fri, Jun 23, 2017 at 02:48:37PM +0800, Herbert Xu wrote: > On Mon, Jun 19, 2017 at 09:55:24AM +0200, Corentin Labbe wrote: > > > > Since there are two different user of "crypto engine + ablkcipher", it will > > be not easy to convert them in one serie. (I could

[PATCH v5] crypto: sun4i-ss: support the Security System PRNG

2017-07-03 Thread Corentin Labbe
The Security System has a PRNG, this patch adds support for it via crypto_rng. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- Change since v4 - Fixed some spelling issue in Kconfig and patch description Changes since v3 (note: the v3 miss changes and version tag sorry) - Re

Re: [PATCH v4] crypto: sun4i-ss: support the Security System PRNG

2017-07-03 Thread Corentin Labbe
On Mon, Jun 26, 2017 at 02:36:43PM +0200, Frans Klaver wrote: > Hi, > > On Mon, Jun 26, 2017 at 2:20 PM, Corentin Labbe > <clabbe.montj...@gmail.com> wrote: > > The Security System have a PRNG, this patch add support for it via > > crypto_rng. > > s,have,has,

[PATCH v4] crypto: sun4i-ss: support the Security System PRNG

2017-06-26 Thread Corentin Labbe
The Security System have a PRNG, this patch add support for it via crypto_rng. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- Changes since v3 (note: the v3 miss changes and version tag sorry) - Replaced all len values with bits / BITS_PER_LONG or BITS_PER_BYTE Changes si

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-20 Thread Corentin Labbe
On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > Hi, > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > The Security System have a PRNG, this patch add support for it via > > crypto_rng. > > This might be a dumb question, but is

[PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-20 Thread Corentin Labbe
The Security System have a PRNG, this patch add support for it via crypto_rng. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/Kconfig | 8 + drivers/crypto/sunxi-ss/Makefile| 1 + drivers/crypto/sunxi-ss/sun4i-ss-core.

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-06-19 Thread Corentin Labbe
On Mon, Jun 19, 2017 at 01:27:08PM +0800, Herbert Xu wrote: > On Tue, Jun 06, 2017 at 03:44:17PM +0200, Corentin Labbe wrote: > > The crypto engine could actually only enqueue hash and ablkcipher request. > > This patch permit it to enqueue skcipher requets by adding all necessar

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-06-06 Thread Corentin Labbe
On Tue, Jun 06, 2017 at 04:07:25PM +0200, Stephan Müller wrote: > Am Dienstag, 6. Juni 2017, 15:44:17 CEST schrieb Corentin Labbe: > > Hi Corentin, > > > The crypto engine could actually only enqueue hash and ablkcipher request. > > This patch permit it to enqueue skciph

[PATCH v2 1/2] crypto: engine - replace pr_xxx by dev_xxx

2017-06-06 Thread Corentin Labbe
By adding a struct device *dev to struct engine, we could store the device used at register time and so use all dev_xxx functions instead of pr_xxx. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c | 23 +-- include/crypto/engine.

[PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-06-06 Thread Corentin Labbe
-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c | 138 include/crypto/engine.h | 14 + 2 files changed, 141 insertions(+), 11 deletions(-) diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c

[PATCH v2 0/2] crypto: engine - Permit to enqueue skcipher request

2017-06-06 Thread Corentin Labbe
The crypto engine could actually only enqueue hash and ablkcipher request. This patch serie permit it to enqueue skcipher requets by adding all necessary functions. Changes since v1 - Aligned to column struct *dev in include - Added missing mutex_unlock in crypto_engine_start() Corentin Labbe (2

Re: [PATCH v2 00/12] ARM: sun5i: cryptographic engine support

2017-05-30 Thread Corentin Labbe
pto/sunxi-ss/sun4i-ss.h | 34 +++-- > 5 files changed, 321 insertions(+), 309 deletions(-) > Hello Thanks for the work For the whole serie: Tested-by: Corentin Labbe <clabbe.montj...@gmail.com> Acked-by: Corentin Labbe <clabbe.montj...@gmail.com>

Re: [PATCH 09/11] crypto: sun4i-ss: move from ablkcipher to skcipher API

2017-05-29 Thread Corentin Labbe
On Wed, May 24, 2017 at 09:06:50PM +0200, Antoine Tenart wrote: > Update the sun4i-ss driver to use the skcipher API instead of the old > ablkcipher one. It's a bit more tricky than s/ablkcipher/skcipher/, but > still nothing special and the driver's logic stays the same. > > Signed-off-by:

Re: [PATCH 10/11] crypto: sun4i-ss: fix large block size support

2017-05-26 Thread Corentin Labbe
is > + * available in the diesgt registers. Hence the delay to be sure we can and here. This behaviour is very strange since I didnt get it on other platform. Could you give me the board name where you get it ? Does any wmb() after the writel(..SS_DATA_END..) do the trick ? Which speed are the SS clocks ? Anyway the whole serie seems good, I will test it just after this weekend. Thanks Regards Corentin Labbe

[PATCH 2/2] crypto: engine - Permit to enqueue skcipher request

2017-05-23 Thread Corentin Labbe
-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c | 136 include/crypto/engine.h | 14 + 2 files changed, 139 insertions(+), 11 deletions(-) diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c

[PATCH 1/2] crypto: engine - replace pr_xxx by dev_xxx

2017-05-23 Thread Corentin Labbe
By adding a struct device *dev to struct engine, we could store the device used at register time and so use all dev_xxx functions instead of pr_xxx. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- crypto/crypto_engine.c | 23 +-- include/crypto/engine.

DEADLOCK: bisected to d215aab82d81974f438bfbc80aa437132f3c37c3 ("cpu/hotplug: Convert hotplug locking to percpu rwsem")

2017-05-21 Thread Corentin Labbe
go further. Regards Corentin Labbe

[PATCH v2 3/9] crypto: ixp4xx - Use IPAD/OPAD constant

2017-05-19 Thread Corentin Labbe
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/ixp4xx_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/

[PATCH v2 4/9] crypto: marvell - Use IPAD/OPAD constant

2017-05-19 Thread Corentin Labbe
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/marvell/hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/marvell/hash.c b/drivers/

[PATCH v2 5/9] crypto: mv_cesa - Use IPAD/OPAD constant

2017-05-19 Thread Corentin Labbe
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/mv_cesa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_

[PATCH v2 2/9] crypto: brcm - Use IPAD/OPAD constant

2017-05-19 Thread Corentin Labbe
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> --- drivers/crypto/bcm/cipher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/bcm/cipher.c b/drivers/cryp

[PATCH v2 0/9] crypto: add HMAC IPAD/OPAD constant

2017-05-19 Thread Corentin Labbe
Hello Many HMAC users directly use directly 0x36/0x5c values. It's better with crypto to use a name instead of directly some crypto constant. Changes since v1: - Moved constant to include/crypto/hmac.h - Added to includes Corentin Labbe (9): crypto: add hmac IPAD/OPAD constant crypto: brcm

  1   2   3   >