Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Stephan Mueller
Am Freitag, dem 09.04.2021 um 10:11 +0800 schrieb Hangbin Liu: > On Thu, Apr 08, 2021 at 08:11:34AM -0700, Eric Biggers wrote: > > On Thu, Apr 08, 2021 at 07:58:08PM +0800, Hangbin Liu wrote: > > > On Thu, Apr 08, 2021 at 09:06:52AM +0800, Hangbin Liu wrote: > > > > > Also, couldn't you just consid

Re: [PATCH] crypto: deflate - Remove useless call "zlib_inflateEnd"

2021-04-09 Thread Herbert Xu
On Wed, Mar 31, 2021 at 11:34:57AM +0800, Jiapeng Chong wrote: > Fix the following whitescan warning: > > Calling "zlib_inflateEnd(&ctx->decomp_stream)" is only useful for its > return value, which is ignored. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > crypto/deflate.c

Re: [PATCH] crypto: api - fix coding style

2021-04-09 Thread Herbert Xu
On Thu, Apr 01, 2021 at 03:20:49PM +0800, Zhiqi Song wrote: > Fixed following checkpatch error: > - do not use assignment in if condition > Fixed following checkpatch warning: > - prefer strscpy over strlcpy > - delete repeated word > > Signed-off-by: Zhiqi Song > --- > crypto/api.c | 20 +++

Re: [PATCH] crypto: cbc - fix coding style

2021-04-09 Thread Herbert Xu
On Thu, Apr 01, 2021 at 03:31:41PM +0800, Zhiqi Song wrote: > Fixed following checkpatch error: > - do not use assignment in if condition > > Signed-off-by: Zhiqi Song > --- > crypto/cbc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) This patch does not appear to improve the code.

Re: [PATCH v2] crypto: hisilicon/hpre - delete redundant log

2021-04-09 Thread Herbert Xu
On Fri, Apr 02, 2021 at 07:24:29PM +0800, Hui Tang wrote: > 'hpre_cfg_by_dsm' has checked and printed error path internally. It is not > necessary to do it here, so remove it. > > Signed-off-by: Hui Tang > > v1 -> v2: > - Return immediately when return value of 'hpre_cfg_by_dsm' is non-zero. > -

Re: [PATCH] crypto: chelsio: fix incorrect kernel-doc comment syntax in file

2021-04-09 Thread Herbert Xu
On Mon, Mar 29, 2021 at 04:15:14PM +0530, Aditya Srivastava wrote: > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > The header for drivers/crypto/chelsio/chcr_core.c follows this syntax, but > the content inside does not comply with kernel-doc. >

Re: [PATCH v2 5/5] crypto: hisilicon/sgl - fix the sg buf unmap

2021-04-09 Thread Herbert Xu
On Tue, Mar 30, 2021 at 03:39:06PM +0800, Kai Ye wrote: > Add clear data operation for sge data. > > Signed-off-by: Kai Ye > --- > drivers/crypto/hisilicon/sgl.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/cryp

Re: [PATCH] crypto: allwinner: add missing CRYPTO_ prefix

2021-04-09 Thread Herbert Xu
On Mon, Mar 29, 2021 at 10:12:00PM +0200, Corentin Labbe wrote: > Some CONFIG select miss CRYPTO_. > > Reported-by: Chen-Yu Tsai > Fixes: 56f6d5aee88d1 ("crypto: sun8i-ce - support hash algorithms") > Fixes: d9b45418a9177 ("crypto: sun8i-ss - support hash algorithms") > Signed-off-by: Corentin La

Re: crypto: possible NULL reference

2021-04-09 Thread Herbert Xu
On Mon, Mar 29, 2021 at 09:11:17PM -0700, Randy Dunlap wrote: > > Is there something else protecting the improper use of > in these cases? or is a patch warranted? The curve ID is always hard-coded and AFAIK we don't have any use-cases where an unsupported curve ID is used. Cheers, -- Email: H

Re: [PATCH v2] crypto: hisilicon/sec - Fix a module parameter error

2021-04-09 Thread Herbert Xu
On Tue, Mar 30, 2021 at 04:02:32PM +0800, Longfang Liu wrote: > ctx_q_num is a module parameter set by the user to specify the > number of qp queues required to create a ctx. > > When the number of qp queues allocated by PF or VF is less than > the ctx_q_num, an error will be reported when ctx is

Re: [PATCH] crypto: ccp -A value assigned to a variable is never used.

2021-04-09 Thread Herbert Xu
On Tue, Mar 30, 2021 at 06:10:29PM +0800, Jiapeng Chong wrote: > Fix the following whitescan warning: > > Assigning value "64" to "dst.address" here, but that stored value is > overwritten before it can be used. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/crypto

Re: [PATCH -next] crypto: hisilicon/hpre - fix a typo in hpre_crypto.c

2021-04-09 Thread Herbert Xu
On Tue, Mar 30, 2021 at 07:51:24AM -0400, Ruiqi Gong wrote: > Do a trivial typo fix. > s/discribed/described > > Reported-by: Hulk Robot > Signed-off-by: Ruiqi Gong > --- > drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thank

Re: [PATCH -next] crypto: ccp - Use DEFINE_SPINLOCK() for spinlock

2021-04-09 Thread Herbert Xu
On Wed, Mar 31, 2021 at 10:00:55AM +0800, Tang Yizhou wrote: > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Reported-by: Hulk Robot > Signed-off-by: Tang Yizhou > --- > drivers/crypto/ccp/ccp-crypto-main.c | 3 +-- > 1 f

Re: [PATCH] crypto: rockchip/rk3288_crypto_ahash - delete unneeded variable initialization

2021-04-09 Thread Herbert Xu
On Thu, Apr 01, 2021 at 11:01:39AM +0800, Kai Ye wrote: > Delete unneeded variable initialization > > Signed-off-by: Kai Ye > --- > drivers/crypto/rockchip/rk3288_crypto_ahash.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: htt

Re: [PATCH][next] crypto: sun8i-ss: Fix memory leak of pad

2021-04-09 Thread Herbert Xu
On Thu, Apr 01, 2021 at 04:18:27PM +0100, Colin King wrote: > From: Colin Ian King > > It appears there are several failure return paths that don't seem > to be free'ing pad. Fix these. > > Addresses-Coverity: ("Resource leak") > Fixes: d9b45418a917 ("crypto: sun8i-ss - support hash algorithms")

Re: [PATCH][V2] crypto: sa2ul: Fix memory leak of rxd

2021-04-09 Thread Herbert Xu
On Thu, Apr 01, 2021 at 04:28:39PM +0100, Colin King wrote: > From: Colin Ian King > > There are two error return paths that are not freeing rxd and causing > memory leaks. Fix these. > > Addresses-Coverity: ("Resource leak") > Fixes: 00c9211f60db ("crypto: sa2ul - Fix DMA mapping API usage") >

Re: [PATCH] crypto:hisilicon/sec - fixup checking the 3DES weak key

2021-04-09 Thread Herbert Xu
On Fri, Apr 02, 2021 at 10:47:57AM +0800, Kai Ye wrote: > skcipher: Add a verifying to check whether the triple DES key > is weak. > > Signed-off-by: Kai Ye > --- > drivers/crypto/hisilicon/sec2/sec_crypto.c | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) Patch applied.

Re: [PATCH v2] crypto: hisilicon/qm - delete redundant code

2021-04-09 Thread Herbert Xu
On Fri, Apr 02, 2021 at 07:22:30PM +0800, Kai Ye wrote: > The "qdma" is a structure variable instead of actual data. This > structure doesn't need to be zerod, The memset is useless and redundant. > So delete it. > > Signed-off-by: Kai Ye > --- > Changes v1 -> v2: > Re-edit the description. > >

Re: [PATCH crypto] chcr: Read rxchannel-id from firmware

2021-04-09 Thread Herbert Xu
On Sat, Apr 03, 2021 at 12:55:48AM +0530, Ayush Sawal wrote: > The rxchannel id is updated by the driver using the > port no value, but this does not ensure that the value > is correct. So now rx channel value is obtained from > etoc channel map value. > > Fixes: 567be3a5d227 ("crypto: chelsio - U

Re: [PATCH] crypto: qat: Fix a double free in adf_create_ring

2021-04-09 Thread Herbert Xu
On Fri, Apr 02, 2021 at 10:13:48AM -0700, Lv Yunlong wrote: > In adf_create_ring, if the callee adf_init_ring() failed, the callee will > free the ring->base_addr by dma_free_coherent() and return -EFAULT. Then > adf_create_ring will goto err and the ring->base_addr will be freed again > in adf_cle

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Hangbin Liu
On Fri, Apr 09, 2021 at 09:08:20AM +0200, Stephan Mueller wrote: > > > > > > And how do you handle all the other places in the kernel that use > > > > > > ChaCha20 and > > > > > > SipHash?  For example, drivers/char/random.c? > > > > > > > > > > Good question, I will check it and reply to you late

Re: [PATCH] crypto: api - fix coding style

2021-04-09 Thread songzhiqi (A)
On 2021/4/9 15:27, Herbert Xu wrote: > On Thu, Apr 01, 2021 at 03:20:49PM +0800, Zhiqi Song wrote: >> Fixed following checkpatch error: >> - do not use assignment in if condition >> Fixed following checkpatch warning: >> - prefer strscpy over strlcpy >> - delete repeated word >> >> Signed-off-by

[PATCH v3 1/5] crypto: hisilicon/sgl - add a comment for block size initialization

2021-04-09 Thread Kai Ye
This seems "32" and "31" is obfuscating, It might be better to add a comment, which explain it. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 3bff639..cf1629c

[PATCH v3 3/5] crypto: hisilicon/sgl - add some dfx logs

2021-04-09 Thread Kai Ye
Add some dfx logs in some abnormal exit situations. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index b8a811f..d04e551 100644 --- a/dr

[PATCH v3 2/5] crypto: hisilicon/sgl - delete unneeded variable initialization

2021-04-09 Thread Kai Ye
Delete unneeded variable initialization Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index cf1629c..b8a811f 100644 --- a/drivers/crypto/hisilicon/sgl.c

[PATCH v3 4/5] crypto: hisilicon/sgl - fix the soft sg map to hardware sg

2021-04-09 Thread Kai Ye
The buffer of the hardware sge needs to be initialized by soft sgl. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index d04e551..7f11e41 100644 --- a/drivers/crypto/hisi

[PATCH v3 0/5] bug fix and clear coding style

2021-04-09 Thread Kai Ye
Fixup coding style such as delete unneeded variable initialization. Add a comment for block size initialization. Add a data cleared operation in sg buf unmap, and other misc fix. v1 -> v2: 1. fix [PATCH v2] error in v1. 2. v1 use a macro replace of magic number, v2 use a comment for block s

[PATCH v3 5/5] crypto: hisilicon/sgl - fix the sg buf unmap

2021-04-09 Thread Kai Ye
Add data cleared operation for sge data. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 7f11e41..0572737 100644 --- a/drivers/crypto/

Re: [PATCH v2] crypto: hisilicon/hpre - delete redundant log

2021-04-09 Thread Hui Tang
On 2021/4/9 15:33, Herbert Xu wrote: On Fri, Apr 02, 2021 at 07:24:29PM +0800, Hui Tang wrote: 'hpre_cfg_by_dsm' has checked and printed error path internally. It is not necessary to do it here, so remove it. Signed-off-by: Hui Tang v1 -> v2: - Return immediately when return value of 'hpre

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Simo Sorce
On Fri, 2021-04-09 at 08:02 +0200, Ard Biesheuvel wrote: > On Fri, 9 Apr 2021 at 05:03, Jason A. Donenfeld wrote: > > On Fri, Apr 09, 2021 at 10:49:07AM +0800, Hangbin Liu wrote: > > > On Thu, Apr 08, 2021 at 08:44:35PM -0600, Jason A. Donenfeld wrote: > > > > Since it's just a normal module libra

Re: Re: [PATCH] backports: crypto user - make NETLINK_CRYPTO work

2021-04-09 Thread Jianmin Wang
On Fri, Apr 09, 2021 at 08:36:07 +0200, Greg KH > On Thu, Apr 08, 2021 at 07:11:48PM +, Jianmin Wang wrote: > > while the new services need to invoke libkcapi in the container environment. > > > > We have verified that the problem doesn't exist on newer kernel version. > > However, due to man

[PATCH] crypto: qat - enable detection of accelerators hang

2021-04-09 Thread Giovanni Cabiddu
From: Wojciech Ziemba Enable the detection of hangs by setting watchdog timers (WDTs) on generations that supports that feature. The default timeout value comes from HW specs. WTDs are reset each time an accelerator wins arbitration and is able to send/read a command to/from an accelerator. The

Re: [PATCH v2 18/18] keyctl_pkey: Add pkey parameters slen and mgfhash for PSS

2021-04-09 Thread Ben Boeckel
On Thu, Apr 08, 2021 at 16:15:16 +0200, Varad Gautam wrote: > keyctl pkey_* operations accept enc and hash parameters at present. > RSASSA-PSS signatures also require passing in the signature salt > length and the mgf hash function. > > Add parameters: > - 'slen' to feed in salt length of a PSS si

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Simo Sorce
On Fri, 2021-04-09 at 16:08 +0800, Hangbin Liu wrote: > On Fri, Apr 09, 2021 at 09:08:20AM +0200, Stephan Mueller wrote: > > > > > > > And how do you handle all the other places in the kernel that use > > > > > > > ChaCha20 and > > > > > > > SipHash? For example, drivers/char/random.c? > > > > > >

RE: [PATCH v4 1/1] use crc32 instead of md5 for hibernation e820 integrity check

2021-04-09 Thread David Laight
From: Chris von Recklinghausen > Sent: 08 April 2021 11:46 > > Suspend fails on a system in fips mode because md5 is used for the e820 > integrity check and is not available. Use crc32 instead. > > Prior to this patch, MD5 is used only to create a digest to ensure integrity > of > the region, no

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Jason A. Donenfeld
On Fri, Apr 9, 2021 at 2:08 AM Hangbin Liu wrote: > After offline discussion with Herbert, here is > what he said: > > """ > This is not a problem in RHEL8 because the Crypto API RNG replaces /dev/random > in FIPS mode. > """ So far as I can see, this isn't the case in the kernel sources I'm read

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Jason A. Donenfeld
On Fri, Apr 9, 2021 at 6:47 AM Simo Sorce wrote: > > depends on m || !CRYPTO_FIPS > > > > but I am a bit concerned that the rather intricate kconfig > > dependencies between the generic and arch-optimized versions of those > > drivers get complicated even further. > > Actually this is the opposi

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Simo Sorce
On Fri, 2021-04-09 at 12:36 -0600, Jason A. Donenfeld wrote: > On Fri, Apr 9, 2021 at 6:47 AM Simo Sorce wrote: > > > depends on m || !CRYPTO_FIPS > > > > > > but I am a bit concerned that the rather intricate kconfig > > > dependencies between the generic and arch-optimized versions of those >

Re: [PATCH v4 1/1] use crc32 instead of md5 for hibernation e820 integrity check

2021-04-09 Thread Chris von Recklinghausen
On 4/9/21 12:56 PM, David Laight wrote: From: Chris von Recklinghausen Sent: 08 April 2021 11:46 Suspend fails on a system in fips mode because md5 is used for the e820 integrity check and is not available. Use crc32 instead. Prior to this patch, MD5 is used only to create a digest to ensure i

Re: [GIT PULL][PATCH v9 0/3] Update to zstd-1.4.10

2021-04-09 Thread Nick Terrell
What can I do to help get this merged? Cristoph, is this new patch series with the kernel wrapper API satisfactory? Best, Nick On Tue, Mar 30, 2021 at 3:45 PM Nick Terrell wrote: > > From: Nick Terrell > > Please pull from > > g...@github.com:terrelln/linux.git tags/v9-zstd-1.4.10 > > to get

[PATCH] crypto: arm/curve25519 - Move '.fpu' after '.arch'

2021-04-09 Thread Nathan Chancellor
Debian's clang carries a patch that makes the default FPU mode 'vfp3-d16' instead of 'neon' for 'armv7-a' to avoid generating NEON instructions on hardware that does not support them: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/raw/5a61ca6f21b4ad8c6ac4970e5ea5a7b5b4486d22/debian/patche

Re: [PATCH] crypto: arm/curve25519 - Move '.fpu' after '.arch'

2021-04-09 Thread Jason A. Donenfeld
Seems reasonable to me. Acked-by: Jason A. Donenfeld