Re: [PATCH 4/4] crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930

2021-03-26 Thread shenyang (M)
On 2021/3/26 17:14, Herbert Xu wrote: On Fri, Mar 19, 2021 at 03:33:07PM +0800, Yang Shen wrote: +const struct hisi_zip_sqe_ops hisi_zip_ops_v2 = { + .sqe_type = 0x3, + .fill_addr = hisi_zip_fill_addr, + .fill_buf_size = hisi_zip_fill_buf

Re: [PATCH v8 3/3] lib: zstd: Upgrade to latest upstream zstd version 1.4.10

2021-03-26 Thread Nick Terrell
On Fri, Mar 26, 2021 at 3:02 PM kernel test robot wrote: > > Hi Nick, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on cryptodev/master] > [also build test WARNING on kdave/for-next f2fs/dev-test linus/master > v5.12-rc4 next-2021

Re: [PATCH v8 3/3] lib: zstd: Upgrade to latest upstream zstd version 1.4.10

2021-03-26 Thread kernel test robot
Hi Nick, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [also build test WARNING on kdave/for-next f2fs/dev-test linus/master v5.12-rc4 next-20210326] [cannot apply to crypto/master kees/for-next/pstore squashfs/master] [If your patch is

[PATCH v8 2/3] lib: zstd: Add decompress_sources.h for decompress_unzstd

2021-03-26 Thread Nick Terrell
From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we jus

[PATCH v8 1/3] lib: zstd: Add kernel-specific API

2021-03-26 Thread Nick Terrell
From: Nick Terrell This patch: - Moves `include/linux/zstd.h` -> `include/linux/zstd_lib.h` - Adds a new API in `include/linux/zstd.h` that is functionally equivalent to the in-use subset of the current API. Functions are renamed to avoid symbol collisions with zstd, to make it clear it is

[PATCH v8 0/3] Update to zstd-1.4.10

2021-03-26 Thread Nick Terrell
From: Nick Terrell Please pull from g...@github.com:terrelln/linux.git tags/v8-zstd-1.4.10 to get these changes. Alternatively the patchset is included. This patchset upgrades the zstd library to the latest upstream release. The current zstd version in the kernel is a modified version of ups

[PATCH] crypto: fcrypt: Remove 'do while(0)' loop for single statement macro

2021-03-26 Thread Milan Djurovic
Remove the 'do while(0)' loop in the macro, as it is not needed for single statement macros. Condense into one line. Signed-off-by: Milan Djurovic --- crypto/fcrypt.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c index c36ea0c8be98..76a

[PATCH] crypto: keywrap: Remove else after break statement

2021-03-26 Thread Milan Djurovic
Remove the else because the if statement has a break statement. Fix the checkpatch.pl warning. Signed-off-by: Milan Djurovic --- crypto/keywrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/keywrap.c b/crypto/keywrap.c index 3517773bc7f7..054d9a216fc9 100644 --

Re: [PATCH] crypto: sm3 - use the more precise type u32 instead of unsigned int

2021-03-26 Thread Gilad Ben-Yossef
Hi, Thank you for the patch! On Fri, Mar 26, 2021 at 5:21 AM Tianjia Zhang wrote: > > In the process of calculating the hash, use the more accurate type > 'u32' instead of the original 'unsigned int' to avoid ambiguity. I don't think there is any ambiguity here, as both forms are always the sam

Re: [PATCH] crypto: nx: fix incorrect kernel-doc comment syntax in files

2021-03-26 Thread Herbert Xu
On Sun, Mar 21, 2021 at 06:00:07PM +0530, Aditya Srivastava wrote: > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > There are certain files in drivers/crypto/nx, which follow this syntax, > but the content inside does not comply with kernel-doc. >

Re: [PATCH] crypto: vmx: fix incorrect kernel-doc comment syntax in files

2021-03-26 Thread Herbert Xu
On Sun, Mar 21, 2021 at 01:55:25AM +0530, Aditya Srivastava wrote: > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > There are certain files in drivers/crypto/vmx, which follow this syntax, > but the content inside does not comply with kernel-doc. >

Re: [PATCH] crypto: ux500: fix incorrect kernel-doc comment syntax

2021-03-26 Thread Herbert Xu
On Sun, Mar 21, 2021 at 05:39:12PM +0530, Aditya Srivastava wrote: > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > There are certain files in drivers/crypto/ux500, which follow this syntax, > but the content inside does not comply with kernel-doc.

Re: [PATCH] crypto: amcc: fix incorrect kernel-doc comment syntax in files

2021-03-26 Thread Herbert Xu
On Sun, Mar 21, 2021 at 05:38:32PM +0530, Aditya Srivastava wrote: > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > There are certain files in drivers/crypto/amcc, which follow this syntax, > but the content inside does not comply with kernel-doc.

Re: [PATCH 0/4] crypto: hisilicon/qm - support doorbell isolation and queue number configuration

2021-03-26 Thread Herbert Xu
On Sat, Mar 20, 2021 at 07:27:42PM +0800, Weili Qian wrote: > Kunpeng930 supports getting the number of queues from hardware registers > and queue doorbell isolation. > > This patchset configures the total number of hardware queues and the > maximum number of function queues, and supports queue do

Re: [PATCH] crypto: hisilicon/hpre - fix "hpre_ctx_init" resource leak

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 06:45:27PM +0800, Hui Tang wrote: > When calling "hpre_ctx_set" fails, stop and put qp, > otherwise will leak qp resource. > > Signed-off-by: Hui Tang > --- > drivers/crypto/hisilicon/hpre/hpre_crypto.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-)

Re: [PATCH] crypto: hisilicon/hpre - fix Kconfig

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 06:45:39PM +0800, Hui Tang wrote: > hpre select 'CRYPTO_ECDH' and 'CRYPTO_CURVE25519'. > > Signed-off-by: Hui Tang > --- > drivers/crypto/hisilicon/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto: hisilicon - fix the check on dma address

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 06:45:05PM +0800, Hui Tang wrote: > System may be able to get physical address of zero if not reserved by > firmware. > > The dma address obtained by 'dma_alloc_coherent' is valid, since already > checking cpu va before, so do not check again. > > Signed-off-by: Hui Tang

Re: [PATCH 0/2] crypto: hisilicon/hpre - remove 'CONFIG_CRYPTO_DH'

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 06:44:17PM +0800, Hui Tang wrote: > Remove 'CONFIG_CRYPTO_DH' and optimise 'hpre_algs_register' error path. > > Hui Tang (2): > crypto: hisilicon/hpre - delete wrap of 'CONFIG_CRYPTO_DH' > crypto: hisilicon/hpre - optimise 'hpre_algs_register' error path > > drivers/c

Re: [PATCH] crypto: Correct an error in the comments

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 05:13:34PM +0800, Meng Yu wrote: > Remove repeated word 'bit' in comments. > > Signed-off-by: Meng Yu > --- > crypto/ecc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herber

Re: [PATCH v3 00/10] Rid W=1 warnings in Crypto

2021-03-26 Thread Herbert Xu
On Thu, Mar 18, 2021 at 12:44:12PM +, Lee Jones wrote: > This is set 1 of 2 sets required to fully clean Crypto. > > v2: No functional changes since v1. > v3: Description change and additional struct header fix > > Lee Jones (10): > crypto: hisilicon: sec_drv: Supply missing description for

Re: [PATCH v5 0/2] crypto: qat - fix couple crashes duing error handling

2021-03-26 Thread Herbert Xu
On Thu, Mar 18, 2021 at 11:39:58PM -0400, Tong Zhang wrote: > There are a couple of issues in qat error handling. Those drivers tries to > release resources that is not initialized. This patch series tries to fix > crashes caused by incorrect error handling. > > v2: removed excessive dump in commi

Re: [PATCH] crypto: inside-secure: Minor typo fix in the file safexcel.c

2021-03-26 Thread Herbert Xu
On Wed, Mar 17, 2021 at 02:44:45PM +0530, Bhaskar Chowdhury wrote: > > s/procesing/processing/ > > Signed-off-by: Bhaskar Chowdhury > --- > drivers/crypto/inside-secure/safexcel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto: jitterentropy: Put constants on the right side of the expression

2021-03-26 Thread Herbert Xu
On Tue, Mar 16, 2021 at 06:44:03PM -0700, Milan Djurovic wrote: > This patch fixes the following checkpatch.pl warnings: > > crypto/jitterentropy.c:600: WARNING: Comparisons should place the constant on > the right side of the test > crypto/jitterentropy.c:681: WARNING: Comparisons should place t

Re: [PATCH v12 00/10] Add support for x509 certs with NIST P384/256/192 keys

2021-03-26 Thread Herbert Xu
On Tue, Mar 16, 2021 at 05:07:30PM -0400, Stefan Berger wrote: > This series of patches adds support for x509 certificates signed by a CA > that uses NIST P384, P256 or P192 keys for signing. It also adds support for > certificates where the public key is one of this type of a key. The math > for E

Re: [PATCH] hwrng: core - convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-26 Thread Herbert Xu
On Tue, Mar 16, 2021 at 08:34:12PM +0800, Jay Fang wrote: > From: Zihao Tang > > Fix the following coccicheck warning: > > drivers/char/hw_random/core.c:399:8-16: WARNING: use scnprintf or sprintf. > > Signed-off-by: Zihao Tang > Signed-off-by: Jay Fang > --- > drivers/char/hw_random/core.c

Re: [PATCH v2 0/4] Fix the parameter of dma_map_sg()

2021-03-26 Thread Herbert Xu
On Tue, Mar 16, 2021 at 09:55:22AM +0800, chenxiang wrote: > From: Xiang Chen > > According to Documentation/core-api/dma-api-howto.rst, the parameters > of dma_unmap_sg() must be the same as those which are passed in to the > scatter/gather mapping API. > But for some drivers under crypto, the

Re: [PATCH v3 0/2] PSP TEE driver update and bug fixes

2021-03-26 Thread Herbert Xu
On Mon, Mar 15, 2021 at 01:55:27PM +0530, Rijo Thomas wrote: > The first patch helps to improve the response time by reducing the > polling time of the tee command status variable. > > Second patch is a bug fix to handle multi-threaded use-case. > During testing, race condition was seen due to mis

Re: [PATCH] hwrng: intel - Fix included header from 'asm

2021-03-26 Thread Herbert Xu
On Mon, Mar 15, 2021 at 02:12:04PM +0800, Tian Tao wrote: > This commit fixes the checkpatch warning: > WARNING: Use #include instead of > 34: FILE: drivers/char/hw_random/intel-rng.c:34: > > Signed-off-by: Tian Tao > --- > drivers/char/hw_random/intel-rng.c | 2 +- > 1 file changed, 1 inserti

Re: [PATCH 4/4] crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 03:33:07PM +0800, Yang Shen wrote: > > +const struct hisi_zip_sqe_ops hisi_zip_ops_v2 = { > + .sqe_type = 0x3, > + .fill_addr = hisi_zip_fill_addr, > + .fill_buf_size = hisi_zip_fill_buf_size, > + .fill_buf_type =

Re: [PATCH] crypto: sm3 - use the more precise type u32 instead of unsigned int

2021-03-26 Thread Ard Biesheuvel
On Fri, 26 Mar 2021 at 03:22, Tianjia Zhang wrote: > > In the process of calculating the hash, use the more accurate type > 'u32' instead of the original 'unsigned int' to avoid ambiguity. > > Signed-off-by: Tianjia Zhang I don't see the point of this patch. u32 and unsigned int are always the s

[PATCH] crypto: hisilicon - use the correct HiSilicon copyright

2021-03-26 Thread Hao Fang
s/Hisilicon/HiSilicon/g, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang --- drivers/crypto/hisilicon/sec/sec_algs.c | 2 +- drivers/crypto/hisilicon/sec/sec_drv.c | 6 +++--- drivers/crypto/hisilicon/sec/sec_drv.h | 2 +- 3 files changed, 5 insertions(+), 5 del

Re: [PATCH -next] drivers: crypto: CRYPTO_DEV_HISI_HPRE select CRYPTO_ECC and CRYPTO_ECDH

2021-03-26 Thread yumeng
Thanks, there is a similar patch to yours that was sent in advance: https://www.spinics.net/lists/linux-crypto/msg54238.html 在 2021/3/26 15:16, Zhang Jianhua 写道: If CRYPTO_DEV_HISI_HPRE=y, the following errors will be seen while building hpre_crypto.c drivers/crypto/hisilicon/hpre/hpre_crypto.o

[PATCH -next] drivers: crypto: CRYPTO_DEV_HISI_HPRE select CRYPTO_ECC and CRYPTO_ECDH

2021-03-26 Thread Zhang Jianhua
If CRYPTO_DEV_HISI_HPRE=y, the following errors will be seen while building hpre_crypto.c drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function `hpre_curve25519_compute_value': hpre_crypto.c:(.text+0x151b): undefined reference to `ecc_get_curve25519' drivers/crypto/hisilicon/hpre/hpre_crypto.o:

Re: [RFC 1/1] crypto: dcp - add power management support

2021-03-26 Thread Herbert Xu
On Fri, Mar 19, 2021 at 02:22:57AM +0200, Dragos Rosioru (OSS) wrote: > From: Dragos Rosioru > > Added suspend/resume operations for PM support in the DCP driver. > After a suspend/resume cycle DCP would still be in a low-power mode > and have its clocks gated, thus requiring state to be saved be