Re: [PATCH v2 1/7] crypto: sun4i-ss: linearize buffers content must be kept

2020-09-25 Thread Herbert Xu
On Sun, Sep 20, 2020 at 06:37:12PM +, Corentin Labbe wrote: > When running the non-optimized cipher function, SS produce partial random > output. > This is due to linearize buffers being reseted after each loop. > > Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce stack usage") > Signed-off-by:

Re: [PATCH v2 6/7] crypto: sun4i-ss: enabled stats via debugfs

2020-09-25 Thread Herbert Xu
On Sun, Sep 20, 2020 at 06:37:17PM +, Corentin Labbe wrote: > > diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c > b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c > index f3bdf465b02e..2ec359eaa4cf 100644 > --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c > +++ b

Re: [PATCH -next] crypto: atmel-aes - convert to use be32_add_cpu()

2020-09-25 Thread Herbert Xu
On Mon, Sep 14, 2020 at 12:17:46PM +0800, Liu Shixin wrote: > Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu(). > > Signed-off-by: Liu Shixin > --- > drivers/crypto/atmel-aes.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu

Re: [PATCH 0/2] Add support for the TRNG in Ingenic X1830.

2020-09-25 Thread Herbert Xu
On Mon, Sep 14, 2020 at 12:10:19AM +0800, 周琰杰 (Zhou Yanjie) wrote: > 1.Add the TRNG bindings for the X1830 SoC from Ingenic. > 2.Add X1830 SoC digital true random number generator driver. > > 周琰杰 (Zhou Yanjie) (2): > dt-bindings: RNG: Add Ingenic TRNG bindings. > crypto: Ingenic: Add hardware

Re: [PATCH v2 0/2] crypto: arm/sha-neon - avoid ADRL instructions

2020-09-25 Thread Herbert Xu
On Wed, Sep 16, 2020 at 09:14:16AM +0300, Ard Biesheuvel wrote: > Remove some occurrences of ADRL in the SHA NEON code adopted from the > OpenSSL project. > > I will leave it to the Clang folks to decide whether this needs to be > backported and how far, but a Cc stable seems reasonable here. > >

Re: [PATCH v6] cypto: mediatek - fix leaks in mtk_desc_ring_alloc

2020-09-25 Thread Herbert Xu
On Mon, Sep 14, 2020 at 11:00:51AM +0800, Xiaoliang Pang wrote: > In the init loop, if an error occurs in function 'dma_alloc_coherent', > then goto the err_cleanup section, after run i--, > in the array ring, the struct mtk_ring with index i will not be released, > causing memory leaks > > Fixes:

Re: [PATCH -next] crypto: qat - convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-25 Thread Herbert Xu
On Wed, Sep 16, 2020 at 10:50:17AM +0800, Liu Shixin wrote: > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Liu Shixin > --- > drivers/crypto/qat/qat_common/adf_cfg.c | 19 + > .../qat/qat_common/adf_transport_debug.c | 42 ++- > 2 fil

Re: [PATCH -next] crypto: qat - remove unnecessary mutex_init()

2020-09-25 Thread Herbert Xu
On Wed, Sep 16, 2020 at 02:21:21PM +0800, Qinglang Miao wrote: > The mutex adf_ctl_lock is initialized statically. It is > unnecessary to initialize by mutex_init(). > > Signed-off-by: Qinglang Miao > --- > drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 -- > 1 file changed, 2 deletions(-) Pat

Re: [PATCH -next] crypto: qat - convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-25 Thread Herbert Xu
On Thu, Sep 24, 2020 at 06:00:42AM +0100, Giovanni Cabiddu wrote: > On Wed, Sep 16, 2020 at 03:50:17AM +0100, Liu Shixin wrote: > > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. > > > > Signed-off-by: Liu Shixin > > Acked-by: Giovanni Cabiddu Hi Giovanni: Your acks are not making it to

Re: [PATCH 0/3] crypto: arm/aes-neonbs - some polish

2020-09-25 Thread Herbert Xu
On Wed, Sep 16, 2020 at 03:36:39PM +0300, Ard Biesheuvel wrote: > Some polish for the ARM bit-sliced NEON implementation. No functional > or performance changes anticipated. > > Ard Biesheuvel (3): > crypto: arm/aes-neonbs - avoid hacks to prevent Thumb2 mode switches > crypto: arm/aes-neonbs

Re: [PATCH -next] crypto: marvell/cesa - use devm_platform_ioremap_resource_byname

2020-09-25 Thread Herbert Xu
On Thu, Sep 17, 2020 at 03:42:34PM +0800, Qilong Zhang wrote: > From: Zhang Qilong > > Use the devm_platform_ioremap_resource_byname() helper instead of > calling platform_get_resource_byname() and devm_ioremap_resource() > separately. > > Signed-off-by: Zhang Qilong > --- > drivers/crypto/mar

Re: [PATCH v2] crypto: stm32/crc32 - Avoid lock if hardware is already used

2020-09-25 Thread Herbert Xu
On Wed, Sep 16, 2020 at 08:33:44AM +0200, Nicolas Toromanoff wrote: > If STM32 CRC device is already in use, calculate CRC by software. > > This will release CPU constraint for a concurrent access to the > hardware, and avoid masking irqs during the whole block processing. > > Fixes: 7795c0baf5ac

Re: [PATCH] crypto: procfs: Removing some useless only space lines

2020-09-25 Thread Herbert Xu
On Thu, Sep 17, 2020 at 06:59:36PM +, Corentin Labbe wrote: > Some line got only spaces, remove them > > Signed-off-by: Corentin Labbe > --- > crypto/proc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.ap

Re: [PATCH -next v2] crypto: hisilicon/qm - Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 09:31:13AM +0800, Qinglang Miao wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. > > drivers/crypto/hisilicon/qm.c | 12 +--

Re: [PATCH -next v2] crypto: caam: Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 09:31:11AM +0800, Qinglang Miao wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. > > drivers/crypto/caam/dpseci-debugfs.c | 23 ++--

Re: [PATCH v7 00/17] crypto: allwinner: add xRNG and hashes

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 07:22:58AM +, Corentin Labbe wrote: > Hello > > The main goal of this serie is to add support for TRNG, PRNG and hashes > to the sun8i-ss/sun8i-ce driver. > The whole serie is tested with CRYPTO_EXTRA_TESTS enabled and loading > tcrypt. > The PRNG and TRNG are tested wi

Re: [PATCH -next v2] crypto: amlogic: Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 09:31:10AM +0800, Qinglang Miao wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. > > drivers/crypto/amlogic/amlogic-gxl-core.c | 16

Re: [PATCH -next v2] crypto: allwinner - Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 09:31:08AM +0800, Qinglang Miao wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. > > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cor

Re: [PATCH v9] crypto: af_alg - add extra parameters for DRBG interface

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 04:42:16PM +0100, Elena Petrova wrote: > Extend the user-space RNG interface: > 1. Add entropy input via ALG_SET_DRBG_ENTROPY setsockopt option; > 2. Add additional data input via sendmsg syscall. > > This allows DRBG to be tested with test vectors, for example for the

Re: [PATCH -next v2] crypto: cavium/zip - Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 09:31:12AM +0800, Qinglang Miao wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Qinglang Miao > --- > v2: based on linux-next(20200917), and can be applied to > mainline cleanly now. > > drivers/crypto/cavium/zip/zip_main.c | 44

Re: [PATCH 0/2] crypto: hisilicon/qm - misc fixes

2020-09-25 Thread Herbert Xu
On Sat, Sep 19, 2020 at 07:01:34PM +0800, Weili Qian wrote: > This patchset fix some driver bugs > > Resend this patch series because it depends on > https://patchwork.kernel.org/cover/11760159/ > (crypto: hisilicon/zip - misc clean up). > Now the patch series has been applied. > > Weili Qian (1)

Re: [PATCH] crypto/chcr: fix minor indentation issue

2020-09-25 Thread Herbert Xu
On Fri, Sep 18, 2020 at 10:56:59PM +0100, Colin King wrote: > From: Colin Ian King > > There is a statement that is indented by one whitespace too deeply, > fix this by removing the whitespace. > > Signed-off-by: Colin Ian King > --- > drivers/crypto/chelsio/chcr_core.c | 2 +- > 1 file change

Re: [PATCH v2 0/3] crypto: hisilicon/hpre - misc clean up and fixes

2020-09-25 Thread Herbert Xu
On Sat, Sep 19, 2020 at 11:13:49AM +0800, yumeng 00484669 wrote: > Adjust some tiny coding problems and fix a bug of DH algorithm. > > Changes since v1: > Remove 'u64' cast in 'cpu_to_le64'; > > Meng Yu (3): > crypto: hisilicon/hpre - remove useless code > crypto: hisilicon/hpre - adjust some

Re: [PATCH v7 00/10] crpyto: introduce OSCCA certificate and SM2 asymmetric algorithm

2020-09-25 Thread Herbert Xu
On Mon, Sep 21, 2020 at 12:20:53AM +0800, Tianjia Zhang wrote: > Hello all, > > This new module implement the OSCCA certificate and SM2 public key > algorithm. It was published by State Encryption Management Bureau, China. > List of specifications for OSCCA certificate and SM2 elliptic curve > pub

[PATCH] lib/mpi: Fix unused variable warnings

2020-09-25 Thread Herbert Xu
On Mon, Sep 21, 2020 at 12:20:55AM +0800, Tianjia Zhang wrote: > Expand the mpi library based on libgcrypt, and the ECC algorithm of > mpi based on libgcrypt requires these functions. > Some other algorithms will be developed based on mpi ecc, such as SM2. > > Signed-off-by: Tianjia Zhang > Teste

Re: [PATCH -next] crypto: qat - convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-25 Thread Giovanni Cabiddu
On Fri, Sep 25, 2020 at 06:14:45PM +1000, Herbert Xu wrote: > On Thu, Sep 24, 2020 at 06:00:42AM +0100, Giovanni Cabiddu wrote: > > On Wed, Sep 16, 2020 at 03:50:17AM +0100, Liu Shixin wrote: > > > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. > > > > > > Signed-off-by: Liu Shixin > > > >

Re: [PATCH] lib/mpi: Fix unused variable warnings

2020-09-25 Thread Tianjia Zhang
Hi Herbert, Thanks for your patch, I will do a test later. By the way, did you add special compilation parameters? I compile normally without warnings in gcc 6.5 and 9.3. Best regards, Tianjia On 9/25/20 4:19 PM, Herbert Xu wrote: On Mon, Sep 21, 2020 at 12:20:55AM +0800, Tianjia Zhang wrot

Re: [PATCH] lib/mpi: Fix unused variable warnings

2020-09-25 Thread Tianjia Zhang
Hi Herbert, Thanks for your patch, The changes look good. I have tested this patch, so, Tested-by: Tianjia Zhang Best regards, Tianjia On 9/25/20 4:19 PM, Herbert Xu wrote: On Mon, Sep 21, 2020 at 12:20:55AM +0800, Tianjia Zhang wrote: Expand the mpi library based on libgcrypt, and the ECC

[PATCH RESEND 0/4] crypto: hisilicon/zip - misc clean up

2020-09-25 Thread Yang Shen
This patchset fix some bug: patch 1:clear the debug registers when remove driver patch 2:intercept invalid input when using decompress patch 3:replace the return value '-EBUSY' with '-EAGAIN' when device is busy patch 4:initialize the 'curr_qm_qp_num' when probe device Resend this patch series

[PATCH RESEND 4/4] crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num'

2020-09-25 Thread Yang Shen
From: Sihang Chen The 'qm->curr_qm_qp_num' is not initialized, which will result in failure to write the current_q file. Signed-off-by: Sihang Chen Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PATCH RESEND 3/4] crypto: hisilicon/zip - fix the return value when device is busy

2020-09-25 Thread Yang Shen
As before, when the ZIP device is too busy to creat a request, it will return '-EBUSY'. But the crypto process think the '-EBUSY' means a successful request and wait for its completion. So replace '-EBUSY' with '-EAGAIN' to show crypto this request is failed. Fixes: 62c455ca853e("crypto: hisilico

[PATCH RESEND 2/4] crypto: hisilicon/zip - fix zero length input in GZIP decompress

2020-09-25 Thread Yang Shen
From: Zhou Wang The zero length input will cause a call trace when use GZIP decompress like this: Unable to handle kernel paging request at virtual address ... lr : get_gzip_head_size+0x7c/0xd0 [hisi_zip] Judge the input length and return '-EINVAL' when input is invalid. Fixes: 62c4

[PATCH RESEND 1/4] crypto: hisilicon/zip - fix the uncleared debug registers

2020-09-25 Thread Yang Shen
From: Hao Fang ZIP debug registers aren't cleared even if its driver is removed, so add a clearing operation when remove driver. Signed-off-by: Hao Fang Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 18 ++ 1 file changed, 18 ins

Re: WARNING: at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0

2020-09-25 Thread Corentin Labbe
On Tue, Mar 03, 2020 at 04:31:11PM -0500, Daniel Jordan wrote: > On Tue, Mar 03, 2020 at 08:48:19AM +0100, Corentin Labbe wrote: > > The patch fix the issue. Thanks! > > Thanks for trying it! > > > So you could add: > > Reported-by: Corentin Labbe > > Tested-by: Corentin Labbe > > Tested-on: su