Re: [PATCH v4 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Tong Zhang
Thanks, I fixed the headline and sent it as v5. - Tong On Thu, Mar 18, 2021 at 1:18 PM Giovanni Cabiddu wrote: > > Just a minor comment on the commit message: > crypto: qat: ADF_STATUS_PF_RUNNING ... >^ > Patches to the qat driver have the following headline: > crypto: qat - >

[PATCH v5 2/2] crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Tong Zhang
ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the vf2pf_lock is initialized in adf_dev_init(), which can fail and when it fail, the vf2pf_lock is either not initialized or destroyed, a subsequent use of vf2p

[PATCH v5 1/2] crypto: qat - don't release uninitialized resources

2021-03-18 Thread Tong Zhang
adf_vf_isr_resource_alloc() is not unwinding correctly when error happens and it want to release uninitialized resources. To fix this, only release initialized resources. [1.792845] Trying to free already-free IRQ 11 [1.793091] WARNING: CPU: 0 PID: 182 at kernel/irq/manage.c:1821 free_irq

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

2021-03-18 Thread Tong Zhang
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 commit log as suggested by Andy Shevchenko v3: collect tags as suggested

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

2021-03-18 Thread Dragos Rosioru (OSS)
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 beforehand: - Control register value(DCP_CTRL) - Channel control register value(DC

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

2021-03-18 Thread Dragos Rosioru (OSS)
From: Dragos Rosioru This patch aims to enable PM support in the DCP driver. The values for DCP Control and Channel Control registers had to be saved and restored due to the fact that the DCP block would remain in a low-power mode and have its clocks gated after suspend/resume cycles. A simple t

Re: stable request

2021-03-18 Thread Ard Biesheuvel
On Thu, 18 Mar 2021 at 18:13, Ard Biesheuvel wrote: > > On Thu, 18 Mar 2021 at 17:42, Sasha Levin wrote: > > > > On Thu, Mar 18, 2021 at 03:15:35PM +0100, Ard Biesheuvel wrote: > > >On Thu, 18 Mar 2021 at 14:03, Sasha Levin wrote: > > >> What about anything older than 5.10? Looks like it's neede

Re: [PATCH v4 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Giovanni Cabiddu
Just a minor comment on the commit message: crypto: qat: ADF_STATUS_PF_RUNNING ... ^ Patches to the qat driver have the following headline: crypto: qat - not crypto: qat : Regards, -- Giovanni On Thu, Mar 18, 2021 at 12:21:05PM -0400, Tong Zhang wrote: > ADF_STATUS_PF

Re: stable request

2021-03-18 Thread Ard Biesheuvel
On Thu, 18 Mar 2021 at 17:42, Sasha Levin wrote: > > On Thu, Mar 18, 2021 at 03:15:35PM +0100, Ard Biesheuvel wrote: > >On Thu, 18 Mar 2021 at 14:03, Sasha Levin wrote: > >> What about anything older than 5.10? Looks like it's needed there too? > >> > > > >Yes, 4.19 and 5.4 should probably get th

Re: stable request

2021-03-18 Thread Sasha Levin
On Thu, Mar 18, 2021 at 03:15:35PM +0100, Ard Biesheuvel wrote: On Thu, 18 Mar 2021 at 14:03, Sasha Levin wrote: What about anything older than 5.10? Looks like it's needed there too? Yes, 4.19 and 5.4 should probably get this too. They should apply with minimal effort, afaict. The only conf

Re: [PATCH v3 1/2] crypto: qat - dont release uninitialized resources

2021-03-18 Thread Tong Zhang
Thanks! I have fixed typos and resent them as v4. - Tong

[PATCH v4 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Tong Zhang
ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the vf2pf_lock is initialized in adf_dev_init(), which can fail and when it fail, the vf2pf_lock is either not initialized or destroyed, a subsequent use of vf2p

[PATCH v4 1/2] crypto: qat - don't release uninitialized resources

2021-03-18 Thread Tong Zhang
adf_vf_isr_resource_alloc() is not unwinding correctly when error happens and it tris to release uninitialized resources. To fix this, only release initialized resources. [1.792845] Trying to free already-free IRQ 11 [1.793091] WARNING: CPU: 0 PID: 182 at kernel/irq/manage.c:1821 free_irq

[PATCH v4 0/2] crypto: qat: fix couple crashes duing error handling

2021-03-18 Thread Tong Zhang
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 commit log as suggested by Andy Shevchenko v3: collect tags as suggested

Re: [PATCH 05/10] crypto: keembay: ocs-hcu: Fix incorrectly named functions/structs

2021-03-18 Thread Alessandrelli, Daniele
On Thu, 2021-03-18 at 12:44 +, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/crypto/keembay/ocs-hcu.c:107: warning: expecting prototype for > struct ocs_hcu_dma_list. Prototype was for struct ocs_hcu_dma_entry instead > drivers/crypto/keembay/ocs-hcu.c:127:

Re: [PATCH v3 1/2] crypto: qat - dont release uninitialized resources

2021-03-18 Thread Giovanni Cabiddu
On Thu, Mar 18, 2021 at 03:53:03PM +, Giovanni Cabiddu wrote: > On Fri, Mar 12, 2021 at 11:22:02AM -0500, Tong Zhang wrote: > > adf_vf_isr_resource_alloc() is not unwinding correctly when error > > happens and it trys to release uninitialized resources. Typo: perhaps 'tr

Re: [PATCH v3 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-18 Thread Giovanni Cabiddu
On Fri, Mar 12, 2021 at 11:22:03AM -0500, Tong Zhang wrote: > ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() > before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the > vf2pf_lock is initialized in adf_dev_init(), which can fail and when it > fail, the vf2pf_

Re: [PATCH v3 1/2] crypto: qat - dont release uninitialized resources

2021-03-18 Thread Giovanni Cabiddu
On Fri, Mar 12, 2021 at 11:22:02AM -0500, Tong Zhang wrote: > adf_vf_isr_resource_alloc() is not unwinding correctly when error > happens and it trys to release uninitialized resources. > To fix this, only release initialized resources. > > [1.792845] Trying to free already-free IRQ 11 > [

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

2021-03-18 Thread Stephan Mueller
Am Dienstag, dem 16.03.2021 um 18:44 -0700 schrieb Milan Djurovic: > 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

Re: stable request

2021-03-18 Thread Ard Biesheuvel
On Thu, 18 Mar 2021 at 14:03, Sasha Levin wrote: > > On Tue, Mar 16, 2021 at 01:35:40PM +0100, Ard Biesheuvel wrote: > >On Tue, 16 Mar 2021 at 13:28, Thomas Backlund wrote: > >> > >> > >> Den 16.3.2021 kl. 14:15, skrev Thomas Backlund: > >> > > >> > Den 16.3.2021 kl. 12:17, skrev Ard Biesheuvel:

Re: stable request

2021-03-18 Thread Sasha Levin
On Tue, Mar 16, 2021 at 01:35:40PM +0100, Ard Biesheuvel wrote: On Tue, 16 Mar 2021 at 13:28, Thomas Backlund wrote: Den 16.3.2021 kl. 14:15, skrev Thomas Backlund: > > Den 16.3.2021 kl. 12:17, skrev Ard Biesheuvel: >> On Tue, 16 Mar 2021 at 10:21, Thomas Backlund wrote: >>> Den 16.3.2021 kl

[PATCH 10/10] crypto: cavium: nitrox_isr: Demote non-compliant kernel-doc headers

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/cavium/nitrox/nitrox_isr.c:17: warning: expecting prototype for One vector for each type of ring(). Prototype was for NR_RING_VECTORS() instead drivers/crypto/cavium/nitrox/nitrox_isr.c:224: warning: Function parameter or member '

[PATCH 07/10] crypto: caam: caampkc: Provide the name of the function and provide missing descriptions

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'xts_key_fallbac

[PATCH 08/10] crypto: vmx: Source headers are not good kernel-doc candidates

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/vmx/vmx.c:23: warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Michael Ellerman Cc: Be

[PATCH 06/10] crypto: atmel-ecc: Struct headers need to start with keyword 'struct'

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/atmel-ecc.c:41: warning: cannot understand function prototype: 'struct atmel_ecdh_ctx ' Cc: Tudor Ambarus Cc: Herbert Xu Cc: "David S. Miller" Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: linux-crypto@vge

[PATCH 09/10] crypto: nx: nx-aes-cbc: Repair some kernel-doc problems

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'tfm' not described in 'cbc_aes_nx_set_key' drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'in_key' not described in 'cbc_aes_nx_set_key' drivers

[PATCH 05/10] crypto: keembay: ocs-hcu: Fix incorrectly named functions/structs

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/keembay/ocs-hcu.c:107: warning: expecting prototype for struct ocs_hcu_dma_list. Prototype was for struct ocs_hcu_dma_entry instead drivers/crypto/keembay/ocs-hcu.c:127: warning: expecting prototype for struct ocs_dma_list. Protot

[PATCH 03/10] crypto: chelsio: chcr_core: Fix some kernel-doc issues

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/chelsio/chcr_core.c:2: warning: wrong kernel-doc identifier on line: drivers/crypto/chelsio/chcr_algo.c:806: warning: Function parameter or member 'wrparam' not described in 'create_cipher_wr' drivers/crypto/chelsio/chcr_algo.c:8

[PATCH 04/10] crypto: ux500: hash: hash_core: Fix worthy kernel-doc headers and remove others

2021-03-18 Thread Lee Jones
The ones remove here not only fail to conform to kernel-doc, but also provide no value, so let's remove them completely in this case. Fixes the following W=1 kernel build warning(s): drivers/crypto/ux500/hash/hash_core.c:368: warning: Function parameter or member 'ctx' not described in 'hash_ge

[PATCH 02/10] crypto: bcm: Fix a whole host of kernel-doc misdemeanours

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'from_nents' not described in 'spu_msg_sg_add' drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'length' not described in 'spu_msg_sg_add' drivers/crypto/b

[PATCH 01/10] crypto: hisilicon: sec_drv: Supply missing description for 'sec_queue_empty()'s 'queue' param

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/hisilicon/sec/sec_drv.c:843: warning: Function parameter or member 'queue' not described in 'sec_queue_empty' Cc: Herbert Xu Cc: "David S. Miller" Cc: Zaibo Xu Cc: Jonathan Cameron Cc: linux-crypto@vger.kernel.org Signed-off-by

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

2021-03-18 Thread Lee Jones
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 'sec_queue_empty()'s 'queue' param crypto: bcm: Fix a whole host o