Re: linux-next: manual merge of the sound-asoc tree with the crypto tree

2020-05-12 Thread Herbert Xu
On Tue, May 12, 2020 at 01:08:05PM -0700, Eric Biggers wrote: > > If you're concerned about total stack usage, then my recommendation is that > Herbert drops my patch "ASoC: cros_ec_codec: use crypto_shash_tfm_digest()" > from cryptodev, and you keep the patch > "ASoC: cros_ec_codec: allocate shash

Re: linux-next: manual merge of the sound-asoc tree with the crypto tree

2020-05-12 Thread Arnd Bergmann
On Tue, May 12, 2020 at 10:08 PM Eric Biggers wrote: > On Tue, May 12, 2020 at 06:08:01PM +0100, Mark Brown wrote: > > For later: if SHASH_DESC_ON_STACK is causing problems, we really ought to > find a > better solution, since lots of users are using this macro. A version of > crypto_shash_tfm_d

Re: linux-next: manual merge of the sound-asoc tree with the crypto tree

2020-05-12 Thread Eric Biggers
On Tue, May 12, 2020 at 06:08:01PM +0100, Mark Brown wrote: > On Tue, May 12, 2020 at 09:36:32AM -0700, Eric Biggers wrote: > > On Tue, May 12, 2020 at 05:22:05PM +0100, Mark Brown wrote: > > > > > from the crypto tree and commit: > > > > > a1304cba816e ("ASoC: cros_ec_codec: allocate shash_des

Re: [PATCH] Crypto/chcr: drop refcount on error path in chcr_aead_op()

2020-05-12 Thread Ayush Sawal
On 5/12/2020 2:07 PM, Dan Carpenter wrote: We need to drop inflight counter before returning on this error path. Fixes: d91a3159e8d9 ("Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests") Signed-off-by: Dan Carpenter --- drivers/crypto/chelsio/chcr_algo.c | 1 + 1 file changed, 1 insert

Re: linux-next: manual merge of the sound-asoc tree with the crypto tree

2020-05-12 Thread Mark Brown
On Tue, May 12, 2020 at 09:36:32AM -0700, Eric Biggers wrote: > On Tue, May 12, 2020 at 05:22:05PM +0100, Mark Brown wrote: > > > from the crypto tree and commit: > > > a1304cba816e ("ASoC: cros_ec_codec: allocate shash_desc dynamically") > > > from the sound-asoc tree. > I Cc'ed it to the pe

Re: linux-next: manual merge of the sound-asoc tree with the crypto tree

2020-05-12 Thread Eric Biggers
On Tue, May 12, 2020 at 05:22:05PM +0100, Mark Brown wrote: > On Tue, May 12, 2020 at 02:49:49PM +1000, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the sound-asoc tree got a conflict in: > > > > sound/soc/codecs/cros_ec_codec.c > > > > between commit: > > > > 85f

Re: linux-next: manual merge of the sound-asoc tree with the crypto tree

2020-05-12 Thread Mark Brown
On Tue, May 12, 2020 at 02:49:49PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the sound-asoc tree got a conflict in: > > sound/soc/codecs/cros_ec_codec.c > > between commit: > > 85fc78b80f15 ("ASoC: cros_ec_codec: use crypto_shash_tfm_digest()") > Oh, this is

[PATCH 1/5] crypto: stm32/crc: fix ext4 chksum BUG_ON()

2020-05-12 Thread Nicolas Toromanoff
Allow use of crc_update without prior call to crc_init. And change (and fix) driver to use CRC device even on unaligned buffers. Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module") Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/stm32-crc32.c | 98 ++

[PATCH 5/5] crypto: stm32/crc: protect from concurrent accesses

2020-05-12 Thread Nicolas Toromanoff
Protect STM32 CRC device from concurrent accesses. As we create a spinlocked section that increase with buffer size, we provide a module parameter to release the pressure by splitting critical section in chunks. Size of each chunk is defined in burst_size module parameter. By default burst_size=0

[PATCH 4/5] crypto: stm32/crc: don't sleep in runtime pm

2020-05-12 Thread Nicolas Toromanoff
Ensure stm32_crc_update() and stm32_crc_init() can be called in atomic context and can't sleep. Add pm_runtime_irq_safe() to make pm_runtime_get_sync() atomic. Change runtime pm to call clk_enable()/clk_disable() and change system pm to unprepare/prepare the clock and force runtime pm suspend/resu

[PATCH 2/5] crypto: stm32/crc: fix run-time self test issue.

2020-05-12 Thread Nicolas Toromanoff
Fix wrong crc32 initialisation value: "alg: shash: stm32_crc32 test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer" cra_name="crc32c" expects an init value of 0X, cra_name="crc32" expects an init value of 0. Fixes: b51dbe90912a ("crypto: stm32 - Support for S

[PATCH 3/5] crypto: stm32/crc: fix multi-instance

2020-05-12 Thread Nicolas Toromanoff
Ensure CRC algorithm is registered only once in crypto framework when there are several instances of CRC devices. Update the CRC device list management to avoid that only the first CRC instance is used. Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module") Signed-off-by:

[PATCH 0/5] STM32 CRC update

2020-05-12 Thread Nicolas Toromanoff
This set of patches update the STM32 CRC driver. It contains bug fix. First fixes issue if we enable STM32 CRC32 hardware accelerator with ext4 (with metadata-chksum enable) and other fs that use same direct access to update crc32 API without previous init. Second fixes some issues raise by the ex

[PATCH] Crypto/chcr: drop refcount on error path in chcr_aead_op()

2020-05-12 Thread Dan Carpenter
We need to drop inflight counter before returning on this error path. Fixes: d91a3159e8d9 ("Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests") Signed-off-by: Dan Carpenter --- drivers/crypto/chelsio/chcr_algo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/chelsio/chcr_

[PATCH] cxgb4/chcr: Fix a leak in chcr_ktls_dev_add()

2020-05-12 Thread Dan Carpenter
We need to free "tx_info->l2te" if chcr_setup_connection() fails. My other concern was that if we free "tx_info" then "tx_ctx->chcr_info" points to a freed variable. I don't think this causes a problem but it's cleaner to reset it back to NULL. Also I renamed the labels to say what the gotos do