Re: (subset) Re: [PATCH v2 0/9] arm64: rework NEON yielding to avoid scheduling from asm code

2021-02-04 Thread Ard Biesheuvel
On Thu, 4 Feb 2021 at 03:44, Herbert Xu wrote: > > On Wed, Feb 03, 2021 at 09:31:31PM +, Will Deacon wrote: > > > > Applied first patch only to arm64 (for-next/crypto), thanks! > > > > [1/9] arm64: assembler: add cond_yield macro > > https://git.kernel.org/arm64/c/d13c613f136c > > > > Th

[PATCH 0/4] crypto: hisilicon - some updates to adapt Kunpeng930

2021-02-04 Thread Hui Tang
1.Update clusters number for both Kunpeng920 and Kunpeng930. 2.Some bugfixs only on Kunpeng920, so added hardware version wrap. 3.Fix use of 'dma_map_single'. 4.Fix PASID on Kunpeng930. Hui Tang (2): crypto: hisilicon/hpre - adapt the number of clusters crypto: hisilicon/hpre - tiny fix Weili

[PATCH 1/4] crypto: hisilicon/hpre - adapt the number of clusters

2021-02-04 Thread Hui Tang
HPRE of Kunpeng 930 is updated on cluster numbers, so we try to update this driver to make it running okay on Kunpeng920/Kunpeng930 chips. Signed-off-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre.h | 8 ++-- drivers/crypto/hisilicon/hpre/hpre_main.c | 71 -

[PATCH 4/4] crypto: hisilicon - PASID fixed on Kunpeng 930

2021-02-04 Thread Hui Tang
From: Weili Qian Enable PASID by setting 'sqc' and 'cqc' pasid bits per queue in Kunpeng 930. For Kunpeng 920, PASID is effective for all queues once set in SVA scenarios. Signed-off-by: Weili Qian Signed-off-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 18 ++

[PATCH 2/4] crypto: hisilicon/hpre - tiny fix

2021-02-04 Thread Hui Tang
Update since some special settings only for Kunpeng920. Signed-off-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c i

[PATCH 3/4] crypto: hisilicon/qm - fix use of 'dma_map_single'

2021-02-04 Thread Hui Tang
From: Weili Qian Calling 'dma_map_single' after the data is written to ensure that the cpu cache and dma cache are consistent. Signed-off-by: Weili Qian Signed-off-by: Hui Tang --- drivers/crypto/hisilicon/qm.c | 50 +++ 1 file changed, 27 insertions(+)

[PATCH] crypto: hisilicon/hpre - enable Elliptic curve cryptography

2021-02-04 Thread Hui Tang
Enable x25519/x448/ecdh/ecdsa/sm2 algorithm on Kunpeng 930. Signed-off-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c ind

Re: (subset) Re: [PATCH v2 0/9] arm64: rework NEON yielding to avoid scheduling from asm code

2021-02-04 Thread Will Deacon
On Wed, Feb 03, 2021 at 09:31:31PM +, Will Deacon wrote: > On Wed, 3 Feb 2021 12:36:17 +0100, Ard Biesheuvel wrote: > > Given how kernel mode NEON code disables preemption (to ensure that the > > FP/SIMD register state is protected without having to context switch it), > > we need to take care

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

2021-02-04 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 00/20] Rid W=1 warnings in Crypto

2021-02-04 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. This is set 1 of 2 sets required to fully clean Crypto. Lee Jones (20): crypto: hisilicon: sec_drv: Supply missing description for 'sec_queue

[PATCH 02/20] crypto: bcm: util: Repair a couple of documentation formatting issues

2021-02-04 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' Cc: Herbert Xu

Re: (subset) Re: [PATCH v2 0/9] arm64: rework NEON yielding to avoid scheduling from asm code

2021-02-04 Thread Herbert Xu
On Thu, Feb 04, 2021 at 09:29:16AM +0100, Ard Biesheuvel wrote: > > Half of the patches in this series conflict with > > 0df07d8117c3 crypto: arm64/sha - add missing module aliases > > in the cryptodev tree, so that won't work. Fair enough. I'll take the patches. Thanks, -- Email: Herbert Xu

[PATCH 03/20] crypto: chelsio: chcr_core: File headers are not good candidates for kernel-doc

2021-02-04 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: Cc: Ayush Sawal Cc: Vinay Kumar Yadav Cc: Rohit Maheshwari Cc: Herbert Xu Cc: "David S. Miller" Cc: Manoj Malviya Cc: Atul Gupta Cc: Jitendra Lulla Cc: M

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

2021-02-04 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 06/20] crypto: keembay: ocs-hcu: Fix incorrectly named functions/structs

2021-02-04 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 05/20] crypto: bcm: spu: Fix formatting and misspelling issues

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/bcm/spu.c:464: warning: Excess function parameter 'Return' description in 'spum_gcm_ccm_pad_len' drivers/crypto/bcm/spu.c:524: warning: Function parameter or member 'iv_len' not described in 'spum_aead_ivlen' drivers/crypto/bcm/s

[PATCH 07/20] crypto: bcm: spu2: Fix a whole host of kernel-doc misdemeanours

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'fmd' not described in 'spu2_fmd_init' drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'spu2_type' not described in 'spu2_fmd_init' drivers/crypto/bcm/spu

[PATCH 10/20] crypto: chelsio: chcr_algo: Fix a couple of kernel-doc issues caused by doc-rot

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): 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:806: warning: Excess function parameter 'req' description in 'create_cipher_wr' drive

[PATCH 08/20] crypto: ux500: cryp: Demote some conformant non-kernel headers fix another

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/ux500/cryp/cryp.c:19: warning: Incorrect use of kernel-doc format: * cryp_wait_until_done - wait until the device logic is not busy drivers/crypto/ux500/cryp/cryp.c:22: warning: Function parameter or member 'device_data' not desc

[PATCH 09/20] crypto: ux500: cryp_irq: File headers are not good kernel-doc candidates

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: Function parameter or member 'device_data' not described in 'cryp_enable_irq_src' drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: Function parameter or member 'irq_src' not described in 'cryp_e

[PATCH 18/20] crypto: nx: nx_debugfs: Header comments should not be kernel-doc

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx_debugfs.c:34: warning: Function parameter or member 'drv' not described in 'nx_debugfs_init' drivers/crypto/nx/nx_debugfs.c:34: warning: expecting prototype for Nest Accelerators driver(). Prototype was for nx_debugfs_init()

[PATCH 19/20] crypto: nx: Demote header comment and add description for 'nbytes'

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx.c:31: warning: Incorrect use of kernel-doc format: * nx_hcall_sync - make an H_COP_OP hcall for the passed in op structure drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'nx_ctx' not described in 'nx_hcall

[PATCH 17/20] crypto: nx: nx-aes-cbc: Headers comments should not be kernel-doc

2021-02-04 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 20/20] crypto: cavium: nitrox_isr: Demote non-compliant kernel-doc headers

2021-02-04 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 15/20] crypto: caam: caamalg_qi2: Supply a couple of 'fallback' related descriptions

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'xts_key_fallback' not described in 'caam_ctx' drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'fallback' not described in 'caam_ctx' Cc: "H

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

2021-02-04 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 13/20] crypto: bcm: cipher: Provide description for 'req' and fix formatting issues

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/bcm/cipher.c:1048: warning: Function parameter or member 'req' not described in 'spu_aead_rx_sg_create' drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'cipher' not described in 'rfc4543_gcm_esp_setkey' dr

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

2021-02-04 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 14/20] crypto: caam: caampkc: Provide the name of the function

2021-02-04 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 Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypt

[PATCH 11/20] crypto: ux500: cryp_core: Fix formatting issue and add description for 'session_id'

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/ux500/cryp/cryp_core.c:42: warning: expecting prototype for ST(). Prototype was for CRYP_MAX_KEY_SIZE() instead drivers/crypto/ux500/cryp/cryp_core.c:91: warning: Function parameter or member 'key' not described in 'cryp_ctx' dri

[net-next v3 07/14] octeontx2-pf: cn10k: Use LMTST lines for NPA/NIX operations

2021-02-04 Thread Geetha sowjanya
This patch adds support to use new LMTST lines for NPA batch free and burst SQE flush. Adds new dev_hw_ops structure to hold platform specific functions and create new files cn10k.c and cn10k.h. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham --- .../net/ethernet/marvell/octeontx2/n

Re: (subset) Re: [PATCH v2 0/9] arm64: rework NEON yielding to avoid scheduling from asm code

2021-02-04 Thread Will Deacon
On Thu, Feb 04, 2021 at 10:10:26PM +1100, Herbert Xu wrote: > On Thu, Feb 04, 2021 at 09:29:16AM +0100, Ard Biesheuvel wrote: > > > > Half of the patches in this series conflict with > > > > 0df07d8117c3 crypto: arm64/sha - add missing module aliases > > > > in the cryptodev tree, so that won't w

[PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning

2021-02-04 Thread Arnd Bergmann
From: Arnd Bergmann When CONFIG_CPUMASK_OFFSTACK is disabled, clang reports a warning about a bogus condition: drivers/crypto/marvell/octeontx2/otx2_cptlf.c:334:21: error: address of array 'lfs->lf[slot].affinity_mask' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

[PATCH 2/2] crypto: marvell - fix ethernet driver dependency

2021-02-04 Thread Arnd Bergmann
From: Arnd Bergmann The OcteonTX2 CPT driver force-enables the OCTEONTX2_MBOX symbol, which fails when network drivers are disabled globally WARNING: unmet direct dependencies detected for OCTEONTX2_MBOX Depends on [n]: NETDEVICES [=n] && ETHERNET [=n] && NET_VENDOR_MARVELL [=n] Selected by

Re: [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl

2021-02-04 Thread Greg KH
On Mon, Feb 01, 2021 at 02:43:51PM -0800, Eric Biggers wrote: > On Tue, Jan 12, 2021 at 11:28:18AM -0800, Eric Biggers wrote: > > From: Eric Biggers > > > > The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which > > doesn't make sense. Reseed it from the input_pool instead. > > > >

Re: [PATCH] vio: make remove callback return void

2021-02-04 Thread Greg Kroah-Hartman
On Wed, Jan 27, 2021 at 10:50:10PM +0100, Uwe Kleine-König wrote: > The driver core ignores the return value of struct bus_type::remove() > because there is only little that can be done. To simplify the quest to > make this function return void, let struct vio_driver::remove() return > void, too. A

Re: [PATCH v7 1/4] crypto: Add support for ECDSA signature verification

2021-02-04 Thread Jarkko Sakkinen
On Thu, Feb 04, 2021 at 04:27:39PM +1100, Herbert Xu wrote: > On Mon, Feb 01, 2021 at 10:19:07AM -0500, Stefan Berger wrote: > > Add support for parsing the parameters of a NIST P256 or NIST P192 key. > > Enable signature verification using these keys. The new module is > > enabled with CONFIG_ECDS

Re: [GIT PULL] immutable branch for amba changes targeting v5.12-rc1

2021-02-04 Thread Russell King - ARM Linux admin
On Tue, Feb 02, 2021 at 03:06:05PM +0100, Greg Kroah-Hartman wrote: > I'm glad to take this through my char/misc tree, as that's where the > other coresight changes flow through. So if no one else objects, I will > do so... Greg, did you end up pulling this after all? If not, Uwe produced a v2. I

Re: [GIT PULL] immutable branch for amba changes targeting v5.12-rc1

2021-02-04 Thread Greg Kroah-Hartman
On Thu, Feb 04, 2021 at 04:52:24PM +, Russell King - ARM Linux admin wrote: > On Tue, Feb 02, 2021 at 03:06:05PM +0100, Greg Kroah-Hartman wrote: > > I'm glad to take this through my char/misc tree, as that's where the > > other coresight changes flow through. So if no one else objects, I will

Re: [GIT PULL] immutable branch for amba changes targeting v5.12-rc1

2021-02-04 Thread Russell King - ARM Linux admin
On Thu, Feb 04, 2021 at 05:56:50PM +0100, Greg Kroah-Hartman wrote: > On Thu, Feb 04, 2021 at 04:52:24PM +, Russell King - ARM Linux admin > wrote: > > On Tue, Feb 02, 2021 at 03:06:05PM +0100, Greg Kroah-Hartman wrote: > > > I'm glad to take this through my char/misc tree, as that's where the

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

2021-02-04 Thread Alessandrelli, Daniele
On Thu, 2021-02-04 at 11:09 +, 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: [GIT PULL] immutable branch for amba changes targeting v5.12-rc1

2021-02-04 Thread Uwe Kleine-König
On Thu, Feb 04, 2021 at 04:59:51PM +, Russell King - ARM Linux admin wrote: > On Thu, Feb 04, 2021 at 05:56:50PM +0100, Greg Kroah-Hartman wrote: > > On Thu, Feb 04, 2021 at 04:52:24PM +, Russell King - ARM Linux admin > > wrote: > > > On Tue, Feb 02, 2021 at 03:06:05PM +0100, Greg Kroah-H

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

2021-02-04 Thread Lee Jones
On Thu, 04 Feb 2021, Alessandrelli, Daniele wrote: > On Thu, 2021-02-04 at 11:09 +, 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_

Re: (subset) Re: [PATCH v2 0/9] arm64: rework NEON yielding to avoid scheduling from asm code

2021-02-04 Thread Herbert Xu
On Thu, Feb 04, 2021 at 01:03:11PM +, Will Deacon wrote: > > Cheers, Herbert. Please just leave the final patch ("arm64: assembler: > remove conditional NEON yield macro"), as we can come back to that for > 5.13. Sure I'll leave out the last patch. Thanks, -- Email: Herbert Xu Home Page: ht

Re: [PATCH 2/2] crypto: marvell - fix ethernet driver dependency

2021-02-04 Thread Herbert Xu
On Thu, Feb 04, 2021 at 04:42:16PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > The OcteonTX2 CPT driver force-enables the OCTEONTX2_MBOX symbol, > which fails when network drivers are disabled globally > > WARNING: unmet direct dependencies detected for OCTEONTX2_MBOX > Depends on [n

Re: [PATCH 12/20] crypto: atmel-ecc: Struct headers need to start with keyword 'struct'

2021-02-04 Thread Tudor.Ambarus
On 2/4/21 1:09 PM, Lee Jones wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Fixes the following W=1 kernel build warning(s): > > drivers/crypto/atmel-ecc.c:41: warning: cannot understand function > prototype: 'struct atmel_ecdh_ctx ' >

Re: [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning

2021-02-04 Thread Nathan Chancellor
On Thu, Feb 04, 2021 at 04:42:15PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > When CONFIG_CPUMASK_OFFSTACK is disabled, clang reports a warning > about a bogus condition: > > drivers/crypto/marvell/octeontx2/otx2_cptlf.c:334:21: error: address of array > 'lfs->lf[slot].affinity_mask'

[PATCH v5 01/11] crypto: qce: sha: Restore/save ahash state with custom struct in export/import

2021-02-04 Thread Thara Gopinath
Export and import interfaces save and restore partial transformation states. The partial states were being stored and restored in struct sha1_state for sha1/hmac(sha1) transformations and sha256_state for sha256/hmac(sha256) transformations.This led to a bunch of corner cases where improper state w

[PATCH v5 02/11] crypto: qce: sha: Hold back a block of data to be transferred as part of final

2021-02-04 Thread Thara Gopinath
If the available data to transfer is exactly a multiple of block size, save the last block to be transferred in qce_ahash_final (with the last block bit set) if this is indeed the end of data stream. If not this saved block will be transferred as part of next update. If this block is not held back

[PATCH v5 00/11] Regression fixes/clean ups in the Qualcomm crypto engine driver

2021-02-04 Thread Thara Gopinath
This patch series is a result of running kernel crypto fuzz tests (by enabling CONFIG_CRYPTO_MANAGER_EXTRA_TESTS) on the transformations currently supported via the Qualcomm crypto engine on sdm845. The first nine patches are fixes for various regressions found during testing. The last two patches

[PATCH v5 03/11] crypto: qce: skcipher: Return unsupported if key1 and key 2 are same for AES XTS algorithm

2021-02-04 Thread Thara Gopinath
Crypto engine does not support key1 = key2 for AES XTS algorithm; the operation hangs the engines. Return -EINVAL in case key1 and key2 are the same. Signed-off-by: Thara Gopinath --- drivers/crypto/qce/skcipher.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff -

Re: [PATCH v4 01/11] crypto: qce: sha: Restore/save ahash state with custom struct in export/import

2021-02-04 Thread Thara Gopinath
On 2/3/21 9:42 PM, Herbert Xu wrote: On Thu, Feb 04, 2021 at 04:56:17AM +0800, kernel test robot wrote: Thank you for the patch! Yet something to improve: Please fix this before you resubmit again. Hi Herbert. Sorry about that. I have send the fix. Thanks, -- Warm Regards Thara

[PATCH v5 11/11] crypto: qce: Remove totallen and offset in qce_start

2021-02-04 Thread Thara Gopinath
totallen is used to get the size of the data to be transformed. This is also available via nbytes or cryptlen in the qce_sha_reqctx and qce_cipher_ctx. Similarly offset convey nothing for the supported encryption and authentication transformations and is always 0. Remove these two redundant paramet

[PATCH v5 07/11] crypto: qce: skcipher: Set ivsize to 0 for ecb(aes)

2021-02-04 Thread Thara Gopinath
ECB transformations do not have an IV and hence set the ivsize to 0 for ecb(aes). Signed-off-by: Thara Gopinath --- drivers/crypto/qce/skcipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qce/skcipher.c b/drivers/crypto/qce/skcipher.c index 28bea9584c33..

[PATCH v5 05/11] crypto: qce: skcipher: Return error for zero length messages

2021-02-04 Thread Thara Gopinath
Crypto engine BAM dma does not support 0 length data. Return unsupported if zero length messages are passed for transformation. Signed-off-by: Thara Gopinath --- drivers/crypto/qce/skcipher.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/qce/skcipher.c b/drivers/crypto/

[PATCH v5 08/11] crypto: qce: skcipher: Improve the conditions for requesting AES fallback cipher

2021-02-04 Thread Thara Gopinath
The following are the conditions for requesting AES fallback cipher. - AES-192 - AES-XTS request with len <= 512 byte (Allow messages of length less than 512 bytes for all other AES encryption algorithms other than AES XTS) - AES-XTS request with len > Q

[PATCH v5 06/11] crypto: qce: skcipher: Return error for non-blocksize data(ECB/CBC algorithms)

2021-02-04 Thread Thara Gopinath
ECB/CBC encryption/decryption requires the data to be blocksize aligned. Crypto engine hangs on non-block sized operations for these algorithms. Return invalid data if data size is not blocksize aligned for these algorithms. Signed-off-by: Thara Gopinath --- drivers/crypto/qce/skcipher.c | 12 ++

[PATCH v5 10/11] crypto: qce: Remover src_tbl from qce_cipher_reqctx

2021-02-04 Thread Thara Gopinath
src_table is unused and hence remove it from struct qce_cipher_reqctx Signed-off-by: Thara Gopinath --- drivers/crypto/qce/cipher.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/qce/cipher.h b/drivers/crypto/qce/cipher.h index cffa9fc628ff..850f257d00f3 100644 --- a/drivers/c

[PATCH v5 09/11] crypto: qce: common: Set data unit size to message length for AES XTS transformation

2021-02-04 Thread Thara Gopinath
Set the register REG_ENCR_XTS_DU_SIZE to cryptlen for AES XTS transformation. Anything else causes the engine to return back wrong results. Acked-by: Bjorn Andersson Signed-off-by: Thara Gopinath --- drivers/crypto/qce/common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v5 04/11] crypto: qce: skcipher: Return unsupported if any three keys are same for DES3 algorithms

2021-02-04 Thread Thara Gopinath
Return unsupported if any three keys are same for DES3 algorithms since CE does not support this and the operation causes the engine to hang. Signed-off-by: Thara Gopinath --- drivers/crypto/qce/skcipher.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/crypto/qce/sk

Re: [PATCH v5 06/11] crypto: qce: skcipher: Return error for non-blocksize data(ECB/CBC algorithms)

2021-02-04 Thread Eric Biggers
On Thu, Feb 04, 2021 at 04:43:54PM -0500, Thara Gopinath wrote: > + /* > + * ECB and CBC algorithms require message lengths to be > + * multiples of block size. > + * TODO: The spec says AES CBC mode for certain versions > + * of crypto engine can handle partial blocks as we

Re: [PATCH v5 05/11] crypto: qce: skcipher: Return error for zero length messages

2021-02-04 Thread Eric Biggers
On Thu, Feb 04, 2021 at 04:43:53PM -0500, Thara Gopinath wrote: > Crypto engine BAM dma does not support 0 length data. Return unsupported > if zero length messages are passed for transformation. > > Signed-off-by: Thara Gopinath > --- > drivers/crypto/qce/skcipher.c | 5 + > 1 file changed,

Re: [PATCH v5 05/11] crypto: qce: skcipher: Return error for zero length messages

2021-02-04 Thread Thara Gopinath
Hi Eric, On 2/4/21 5:48 PM, Eric Biggers wrote: On Thu, Feb 04, 2021 at 04:43:53PM -0500, Thara Gopinath wrote: Crypto engine BAM dma does not support 0 length data. Return unsupported if zero length messages are passed for transformation. Signed-off-by: Thara Gopinath --- drivers/crypto/qc

Re: [PATCH v5 06/11] crypto: qce: skcipher: Return error for non-blocksize data(ECB/CBC algorithms)

2021-02-04 Thread Thara Gopinath
On 2/4/21 5:50 PM, Eric Biggers wrote: On Thu, Feb 04, 2021 at 04:43:54PM -0500, Thara Gopinath wrote: + /* +* ECB and CBC algorithms require message lengths to be +* multiples of block size. +* TODO: The spec says AES CBC mode for certain versions +* of

Re: [PATCH v5 05/11] crypto: qce: skcipher: Return error for zero length messages

2021-02-04 Thread Eric Biggers
On Thu, Feb 04, 2021 at 07:09:53PM -0500, Thara Gopinath wrote: > > > @@ -260,6 +261,10 @@ static int qce_skcipher_crypt(struct > > > skcipher_request *req, int encrypt) > > > rctx->flags |= encrypt ? QCE_ENCRYPT : QCE_DECRYPT; > > > keylen = IS_XTS(rctx->flags) ? ctx->enc_keyl

Re: [PATCH v2 0/6] crypto: hisilicon - enable new algorithms of SEC

2021-02-04 Thread liulongfang
On 2021/1/4 19:33, Herbert Xu Wrote: > On Mon, Jan 04, 2021 at 04:15:13PM +0800, liulongfang wrote: >> >> Currently, we have not conducted Fuzz testing. >> For SEC driver, we only adds support for these new algorithms >> with existing interfaces of Crypto. So, do we need to do Fuzz testing on the

Re: [PATCH] crypto/ccree: fix spelling typo of allocated

2021-02-04 Thread Herbert Xu
dingsen...@163.com wrote: > From: dingsenjie > > allocted -> allocated > > Signed-off-by: dingsenjie > --- > drivers/crypto/ccree/cc_cipher.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PG

Re: [PATCH 2/2] crypto: crypto4xx - Avoid linking failure with HW_RANDOM=m

2021-02-04 Thread Herbert Xu
On Sat, Jan 30, 2021 at 02:55:38PM -0800, Florian Fainelli wrote: > It is currently possible to build CONFIG_HW_RANDOM_PPC4XX=y with > CONFIG_HW_RANDOM=m which would lead to the inability of linking with > devm_hwrng_{register,unregister}. We cannot have the framework modular > and the consumer of

Re: [PATCH] crypto: octeontx2 - fix signedness bug in cptvf_register_interrupts()

2021-02-04 Thread Herbert Xu
On Wed, Jan 27, 2021 at 08:25:59AM +0300, Dan Carpenter wrote: > The "num_vec" has to be signed for the error handling to work. > > Fixes: 19d8e8c7be15 ("crypto: octeontx2 - add virtual function driver > support") > Signed-off-by: Dan Carpenter > --- > drivers/crypto/marvell/octeontx2/otx2_cptv