[PATCH] crypto:hisilicon/sec2 - Fix aead authentication setting key error.

2020-11-09 Thread Kai Ye
Fix aead auth setting key process error. if use soft shash function, driver need to use digest size replace of the user input key length. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sec2/sec_crypto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto

[PATCH] crypto: hisilicon/qm - SVA bugfixed on Kunpeng920

2021-01-04 Thread Kai Ye
Kunpeng920 SEC/HPRE/ZIP cannot support running user space SVA and kernel Crypto at the same time. Therefore, the algorithms should not be registered to Crypto as user space SVA is enabled. Signed-off-by: Kai Ye Reviewed-by: Zaibo Xu Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 6

[PATCH 1/3] crypto: hisilicon - add ZIP device using mode parameter

2021-01-04 Thread Kai Ye
Add 'uacce_mode' parameter for ZIP, which can be set as 0(default) or 1. '0' means ZIP is only registered to kernel crypto, and '1' means it's registered to both kernel crypto and UACCE. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Zaibo Xu

[PATCH 0/3] crypto: hisilicon - register device to uacce

2021-01-04 Thread Kai Ye
1. Add parameter of UACCE mode selection for ZIP. 2. Register SEC and HPRE devices to UACCE framework for user space drivers. Kai Ye (3): crypto: hisilicon - add ZIP device using mode parameter crypto: hisilicon/hpre - register HPRE device to uacce crypto: hisilicon/sec - register SEC

[PATCH 2/3] crypto: hisilicon/hpre - register HPRE device to uacce

2021-01-04 Thread Kai Ye
Register HPRE device to uacce framework for user space. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre_main.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/drivers/crypto/hisilicon/hpre

[PATCH 3/3] crypto: hisilicon/sec - register SEC device to uacce

2021-01-04 Thread Kai Ye
Register SEC device to uacce framework for user space. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/sec2/sec_main.c | 39 +++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon

[PATCH] crypto: testmgr - delete some redundant code

2021-02-22 Thread Kai Ye
Delete sg_data function, because sg_data function definition same as sg_virt(), so need to delete it and use sg_virt() replace to sg_data(). Signed-off-by: Kai Ye --- crypto/testmgr.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crypto/testmgr.c b/crypto

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

2021-03-25 Thread Kai Ye
The memory not needed to clear that will be freed. and the memset is useless after the dma is freed. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/qm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 13cb421..88a6c6f

[PATCH 0/3] crypto: replace memset by memzero_explicit

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data, such as buffer or key. Kai Ye (3): crypto: atmel - use memzero_explicit() for clearing data crypto: qce - use memzero_explicit() for clearing data crypto: stm32 - use memzero_explicit() for clearing data drivers/crypto

[PATCH 1/3] crypto: atmel - use memzero_explicit() for clearing data

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data, such as key. Signed-off-by: Kai Ye --- drivers/crypto/atmel-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 352d80c..4a08b2a 100644 --- a

[PATCH 3/3] crypto: stm32 - use memzero_explicit() for clearing data

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data Signed-off-by: Kai Ye --- drivers/crypto/stm32/stm32-cryp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c index 2a479317..c4297e80 100644

[PATCH 2/3] crypto: qce - use memzero_explicit() for clearing data

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data. Signed-off-by: Kai Ye --- drivers/crypto/qce/sha.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qce/sha.c b/drivers/crypto/qce/sha.c index 61c418c..cb9b3da 100644 --- a/drivers/crypto/qce/sha.c +++ b/drivers

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

2021-03-30 Thread Kai Ye
fixup coding style such as magic number and unneeded variable initialization. Clear data operation in sg buf unmap, and other misc fix. Kai Ye (5): crypto: hisilicon/sgl - fixup coding style crypto: hisilicon/sgl - delete unneeded variable initialization crypto: hisilicon/sgl - add some dfx

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

2021-03-30 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 bd5ef40..b816e74 100644 --- a/drivers/crypto/hisilicon/sgl.c

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

2021-03-30 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 b816e74..4bece3d 100644 --- a

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

2021-03-30 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 4bece3d..c618aaf 100644 --- a/drivers/crypto

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

2021-03-30 Thread Kai Ye
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/crypto/hisilicon/sgl.c index c618aaf..7a58ab3 100644 --- a/drivers/crypto

[PATCH v2 1/5] crypto: hisilicon/sgl - fixup coding style

2021-03-30 Thread Kai Ye
use a macro replace of a magic number. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 3bff639..bd5ef40 100644 --- a/drivers/crypto/hisilicon

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

2021-03-31 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

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

2021-03-31 Thread Kai Ye
ock size initialization. Kai Ye (5): crypto: hisilicon/sgl - add a comment for block size initialization crypto: hisilicon/sgl - delete unneeded variable initialization crypto: hisilicon/sgl - add some dfx logs crypto: hisilicon/sgl - fix the soft sg map to hardware sg crypto: hisilicon/

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

2021-03-31 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

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

2021-03-31 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..101456b 100644 --- a/drivers/crypto

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

2021-03-31 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 v2 3/5] crypto: hisilicon/sgl - add some dfx logs

2021-03-31 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

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

2021-03-31 Thread Kai Ye
Delete unneeded variable initialization Signed-off-by: Kai Ye --- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c index 81befe7

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

2021-04-01 Thread Kai Ye
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(-) diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon

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

2021-04-02 Thread Kai Ye
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. drivers/crypto/hisilicon/qm.c | 1 - 1 file changed, 1

[PATCH 2/2] crypto: hisilicon/sec_drv - use the correct print format

2021-04-08 Thread Kai Ye
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sec/sec_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 1/2] crypto/atmel - use the correct print format

2021-04-08 Thread Kai Ye
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Signed-off-by: Kai Ye --- drivers/crypto/atmel-i2c.c | 2 +- drivers/crypto/atmel-sha.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions

[PATCH 0/2] crypto: correct the use of print format

2021-04-08 Thread Kai Ye
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Kai Ye (2): crypto/atmel - use the correct print format crypto: hisilicon/sec_drv

[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

[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

[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

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

2021-04-09 Thread Kai Ye
ock size initialization. v2 -> v3: fix a sparse warning Kai Ye (5): crypto: hisilicon/sgl - add a comment for block size initialization crypto: hisilicon/sgl - delete unneeded variable initialization crypto: hisilicon/sgl - add some dfx logs crypto: hisilicon/sgl - fix the soft sg

[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