[PATCH v2] ecc: delete a useless function declaration

2021-04-05 Thread Meng Yu
This function declaration has been added in 'ecc_curve.h', delete it in 'crypto/ecc.h'. Fixes: 4e6602916bc6(crypto: ecdsa - Add support for ECDSA ...) Signed-off-by: Meng Yu --- v1 -> v2: Modify the 'Fixes tag' from '14bb76768275' to '4e66029

[PATCH] ecc: delete a useless function declaration

2021-04-02 Thread Meng Yu
This function declaration has been added in 'ecc_curve.h', delete it in 'crypto/ecc.h'. Fixes: 14bb76768275(crypto: ecc - expose ecc curves) Signed-off-by: Meng Yu --- crypto/ecc.h | 8 1 file changed, 8 deletions(-) diff --git a/crypto/ecc.h b/crypto/ecc.h in

[PATCH 2/2] Bluetooth: Coding style fix

2021-03-31 Thread Meng Yu
1. Add space when needed; 2. Block comments style fix; 3. Move open brace '{' following function definitions to the next line; 4. Remove unnecessary braces '{}' for single statement blocks. Signed-off-by: Meng Yu --- net/bluetooth/6lowpan.c | 3 +-- net/bluetoo

[PATCH 0/2] net/Blutooth - Coding style fix

2021-03-31 Thread Meng Yu
Remove 'return' in void function and fix some coding style Meng Yu (2): Bluetooth: Remove 'return' in void function Bluetooth: Coding style fix net/bluetooth/6lowpan.c | 5 + net/bluetooth/hci_debugfs.c | 8 net/bluetooth/hci_event.c | 2 +- net/blu

[PATCH 1/2] Bluetooth: Remove 'return' in void function

2021-03-31 Thread Meng Yu
void function return statements are not generally useful. Signed-off-by: Meng Yu --- net/bluetooth/6lowpan.c| 2 -- net/bluetooth/l2cap_core.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index cff4944..19f7e42 100644 --- a/net

[PATCH] crypto: hisilicon/hpre - Add processing of src_data in 'CURVE25519'

2021-03-27 Thread Meng Yu
HPRE can only deal with src_data smaller than 'p' in 'CURVE25519' algorithm, but 'rfc7748' says: 'Implementations MUST accept non-canonical values and process them as if they had been reduced modulo the field prime' So we get its modulus to p, and then de

[PATCH] pkcs7: Use octal permissions '0444'

2021-03-25 Thread Meng Yu
Fixed following checkpatch warning: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. Signed-off-by: Meng Yu --- crypto/asymmetric_keys/pkcs7_key_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cr

[PATCH] crypto: hisilicon/hpre - rsa key should not be empty

2021-03-25 Thread Meng Yu
We should ensure key is not empty before we set key. Signed-off-by: Meng Yu --- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c index 53068d2..7cf7d80

[PATCH v2] Bluetooth: SCO - Remove trailing semicolon in macros

2021-03-23 Thread Meng Yu
Macros should not use a trailing semicolon. Signed-off-by: Meng Yu --- Changes in v2 -Modify comments net/bluetooth/sco.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 22a110f..3bd4156 100644 --- a/net/bluetooth/sco.c

[PATCH] Bluetooth: SCO - Remove trailing semicolon in macros

2021-03-23 Thread Meng Yu
remove trailing semicolon in macros and coding style fix. Signed-off-by: Meng Yu --- net/bluetooth/sco.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 22a110f..3bd4156 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth

[PATCH v2] Bluetooth: Remove trailing semicolon in macros

2021-03-22 Thread Meng Yu
remove trailing semicolon in macros and coding style fix. Signed-off-by: Meng Yu --- Changes in v2 -Re-base in bluetooth-next net/bluetooth/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index efc19f9..2def906 100644

[PATCH] umem: remove useless 'u64' in 'cpu_to_le64'

2021-03-21 Thread Meng Yu
The 'u64' cast is redundant in 'cpu_to_le64' and coding style fix. Signed-off-by: Meng Yu --- drivers/block/umem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 982732db..3b21b98 100644 --- a/

[PATCH] crypto: atmel-ecc - fix W=1 "cannot understand" warning

2021-03-20 Thread Meng Yu
Fix kernel-doc warnings due to missing "struct" keyword. The warning likes: drivers/crypto/atmel-ecc.c:40: warning: cannot understand function prototype: 'struct atmel_ecdh_ctx ' Signed-off-by: Meng Yu --- drivers/crypto/atmel-ecc.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] Bluetooth: Remove trailing semicolon in macros

2021-03-20 Thread Meng Yu
1. remove trailing semicolon in macros; 2. fix some coding style. Signed-off-by: Meng Yu --- net/bluetooth/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 26e8cfad..07a193e 100644 --- a/net/bluetooth/smp.c +++ b/net

[PATCH] crypto: Correct an error in the comments

2021-03-19 Thread Meng Yu
Remove repeated word 'bit' in comments. Signed-off-by: Meng Yu --- crypto/ecc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ecc.c b/crypto/ecc.c index 0798a18..63ba70b 100644 --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -137,7 +137,7 @@ bool vli_is_zero(cons

[PATCH v10 3/7] crypto: move curve_id of ECDH from the key to algorithm name

2021-03-03 Thread Meng Yu
pto/testmgr and net/bluetooth: Modify 'testmgr.c', 'testmgr.h' and 'net/bluetooth' to adapt the modification. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- crypto/ecdh.c | 72 +++

[PATCH v10 4/7] crypto: and expose ecc curves

2021-03-03 Thread Meng Yu
Move 'ecc_get_curve' to 'include/crypto/ecc_curve.h', so everyone in kernel tree can easily get ecc curve params; Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c | 5 - crypto/ecc.h | 37 ++-- includ

[PATCH v10 2/7] crypto: hisilicon/hpre - add algorithm type

2021-03-03 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v10 5/7] crypto: hisilicon/hpre - add 'ECDH' algorithm

2021-03-03 Thread Meng Yu
1. Enable 'ECDH' algorithm in Kunpeng 930; 2. HPRE ECDH Support: ecdh-nist-p192, ecdh-nist-p256. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 515 +++- driv

[PATCH v10 7/7] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2021-03-03 Thread Meng Yu
Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/Kconfig| 1 + drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_cryp

[PATCH v10 6/7] crypto: add curve25519 params and expose them

2021-03-03 Thread Meng Yu
1. Add curve 25519 parameters in 'crypto/ecc_curve_defs.h'; 2. Add curve25519 interface 'ecc_get_curve25519_param' in 'include/crypto/ecc_curve.h', to make its parameters be exposed to everyone in kernel tree. Signed-off-by: Meng Yu Reviewed-b

[PATCH v10 0/7] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2021-03-03 Thread Meng Yu
e "depend on" patch before v4->v5: - patch #4: delete P-128 and P-320 curve, as the few using case in the kernel v3 -> v4: - patch #3: add new, and move ecc_curve params to "include/crypto" v2 -> v3: - patch #5: fix sparse warnings - patch #5: add 'CRYPTO_LIB_CURVE2

[PATCH v10 1/7] crypto: hisilicon/hpre - add version adapt to new algorithms

2021-03-03 Thread Meng Yu
Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu --- drivers/crypto/hisilicon/hpre/hpre.h| 5 +++-- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 4 ++-- drivers/crypto/hisilicon/qm.h | 4 ++--

[PATCH v9 4/7] crypto: and expose ecc curves

2021-02-22 Thread Meng Yu
Move 'ecc_get_curve' to 'include/crypto/ecc_curve.h', so everyone in kernel tree can easily get ecc curve params; Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c | 5 - crypto/ecc.h | 37 ++-- includ

[PATCH v9 0/7] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2021-02-22 Thread Meng Yu
in the kernel v3 -> v4: - patch #3: add new, and move ecc_curve params to "include/crypto" v2 -> v3: - patch #5: fix sparse warnings - patch #5: add 'CRYPTO_LIB_CURVE25519_GENERIC' in 'Kconfig' v1 -> v2: - patch #5: delete `curve25519_null_point' Meng

[PATCH v9 7/7] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2021-02-22 Thread Meng Yu
Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/Kconfig| 1 + drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_cryp

[PATCH v9 6/7] crypto: add curve25519 params and expose them

2021-02-22 Thread Meng Yu
1. Add curve 25519 parameters in 'crypto/ecc_curve_defs.h'; 2. Add curve25519 interface 'ecc_get_curve25519_param' in 'include/crypto/ecc_curve.h', to make its parameters be exposed to everyone in kernel tree. Signed-off-by: Meng Yu Reviewed-b

[PATCH v9 2/7] crypto: hisilicon/hpre - add algorithm type

2021-02-22 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v9 5/7] crypto: hisilicon/hpre - add 'ECDH' algorithm

2021-02-22 Thread Meng Yu
1. Enable 'ECDH' algorithm in Kunpeng 930; 2. HPRE ECDH Support: ecdh-nist-p192, ecdh-nist-p256. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 515 +++- driv

[PATCH v9 3/7] crypto: move curve_id of ECDH from the key to algorithm name

2021-02-22 Thread Meng Yu
pto/testmgr and net/bluetooth: Modify 'testmgr.c', 'testmgr.h' and 'net/bluetooth' to adapt the modification. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- crypto/ecdh.c | 72 +++

[PATCH v9 1/7] crypto: hisilicon/hpre - add version adapt to new algorithms

2021-02-22 Thread Meng Yu
Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu --- drivers/crypto/hisilicon/hpre/hpre.h| 5 +++-- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 4 ++-- drivers/crypto/hisilicon/qm.h | 4 ++--

[PATCH v8 6/9] crypto: add new ecc curve and expose them

2021-02-08 Thread Meng Yu
1. Add ecc curves(P224, P384, P521) for ECDH; 2. Reorder ECC 'Curves ID' in 'include/crypto/ecdh.h'; 3. Move 'ecc_get_curve' to 'include/crypto/ecc_curve.h', so everyone in kernel tree can easily get ecc curve params; Signed-off-by: Meng Yu

[PATCH v8 2/9] crypto: hisilicon/hpre - add algorithm type

2021-02-08 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v8 8/9] crypto: add curve25519 params and expose them

2021-02-08 Thread Meng Yu
1. Add curve 25519 parameters; 2. Add curve25519 function 'ecc_get_curve25519_param', to make its parameters be exposed to everyone in kernel tree. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c | 6 ++ crypto/ecc_curve_defs

[PATCH v8 9/9] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2021-02-08 Thread Meng Yu
Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/Kconfig| 1 + drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_crypto.c | 366 +++

[PATCH v8 5/9] crypto: move curve_id of ECDH to algorithm name

2021-02-08 Thread Meng Yu
1. Move curve id of ECDH from the key into the algorithm name instead in crypto; 2. Modify 'testmgr.c' and 'testmgr.h' to adapt the modification. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecdh.c | 72 +++

[PATCH v8 4/9] net/bluetooth: modify ECDH name in 'crypto_alloc_kpp'

2021-02-08 Thread Meng Yu
Algorithm name of ECDH will be changed in crypto, so we modify its name when we call ECDH. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- net/bluetooth/ecdh_helper.c | 2 -- net/bluetooth/selftest.c| 2 +- net/bluetooth/smp.c | 6 +++--- 3 files changed, 4 insertions(+), 6

[PATCH v8 3/9] crypto: atmel-ecc - move curve_id of ECDH from the key to algorithm name

2021-02-08 Thread Meng Yu
As curve id of ECDH will be moved from its key into algorithm name, we cannot use 'curve_id' in 'struct ecdh', so we should modify ECDH driver in atmel, and make ECDH algorithm name be the same as crypto (like 'ecdh-nist-pxxx'); Signed-off-by: Meng Yu Reviewed-by:

[PATCH v8 7/9] crypto: hisilicon/hpre - add 'ECDH' algorithm

2021-02-08 Thread Meng Yu
1. Enable 'ECDH' algorithm in Kunpeng 930; 2. HPRE ECDH Support: ecdh-nist-p192, ecdh-nist-p224, ecdh-nist-p256, ecdh-nist-p384, ecdh-nist-p521. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpr

[PATCH v8 0/9] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2021-02-08 Thread Meng Yu
s to "include/crypto" v2 -> v3: - patch #5: fix sparse warnings - patch #5: add 'CRYPTO_LIB_CURVE25519_GENERIC' in 'Kconfig' v1 -> v2: - patch #5: delete `curve25519_null_point' Meng Yu (9): crypto: hisilicon/hpre - add version adapt to new algorithms crypto: h

[PATCH v8 1/9] crypto: hisilicon/hpre - add version adapt to new algorithms

2021-02-08 Thread Meng Yu
Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu --- drivers/crypto/hisilicon/hpre/hpre.h| 5 +++-- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 4 ++-- drivers/crypto/hisilicon/qm.h | 4 ++--

[PATCH v7 2/7] crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930

2021-01-21 Thread Meng Yu
From: Hui Tang HPRE of Kunpeng 930 is updated on cluster numbers and configurations of Kunpeng 920 HPRE, so we try to update this driver to make it running okay on both chips. Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h

[PATCH v7 6/7] crypto: hisilicon/hpre - add 'ECDH' algorithm

2021-01-21 Thread Meng Yu
1. Enable 'ECDH' algorithm in Kunpeng 930; 2. HPRE ECDH Support ECC curve: P192, P224, P256, P384, P521. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpre_cryp

[PATCH v7 4/7] crypto: add ecc curve and expose them

2021-01-21 Thread Meng Yu
everyone in the kernel tree can easily get ecc curve params; Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- crypto/ecc.c | 15 - crypto/ecc.h | 37 +-- crypto/ecc_curve_defs.h| 152 +

[PATCH v7 5/7] crypto: add curve 25519 and expose them

2021-01-21 Thread Meng Yu
1. Add curve 25519 parameters; 2. Add curve25519 function 'ecc_get_curve25519_param', to be exposed to everyone in kernel tree. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c | 7 +++ crypto/ecc_curve_defs.h| 17 + incl

[PATCH v7 0/7] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2021-01-21 Thread Meng Yu
' v1 -> v2: - patch #5: delete `curve25519_null_point' Hui Tang (1): crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930 Meng Yu (6): crypto: hisilicon/hpre - add version adapt to new algorithms crypto: hisilicon/hpre - add algorithm type crypto: add ecc curve a

[PATCH v7 3/7] crypto: hisilicon/hpre - add algorithm type

2021-01-21 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v7 7/7] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2021-01-21 Thread Meng Yu
Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/Kconfig| 1 + drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_crypto.c | 370 +++

[PATCH v7 1/7] crypto: hisilicon/hpre - add version adapt to new algorithms

2021-01-21 Thread Meng Yu
Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu --- drivers/crypto/hisilicon/hpre/hpre.h| 5 +++-- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 4 ++-- drivers/crypto/hisilicon/qm.h | 4 ++--

[PATCH v6 1/6] crypto: hisilicon/hpre - add version adapt to new algorithms

2021-01-07 Thread Meng Yu
Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu --- drivers/crypto/hisilicon/hpre/hpre.h| 5 +++-- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 4 ++-- drivers/crypto/hisilicon/qm.h | 4 ++--

[PATCH v6 6/6] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2021-01-07 Thread Meng Yu
1. Add 'CURVE25519' curve parameter definition to 'include/crypto/ecc_curve_defs.h'; 2. Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/Kconfig

[PATCH v6 5/6] crypto: hisilicon/hpre - add 'ECDH' algorithm

2021-01-07 Thread Meng Yu
1. Add some new 'ECDH' curve parameter definitions to 'include/crypto/ecc_curve_defs.h', and reorder ECC 'Curves IDs' in 'include/crypto/ecdh.h'; 2. Enable 'ECDH' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu ---

[PATCH v6 2/6] crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930

2021-01-07 Thread Meng Yu
From: Hui Tang HPRE of Kunpeng 930 is updated on cluster numbers and configurations of Kunpeng 920 HPRE, so we try to update this driver to make it running okay on both chips. Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h

[PATCH v6 0/6] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2021-01-07 Thread Meng Yu
x27;CRYPTO_LIB_CURVE25519_GENERIC' in 'Kconfig' v1 -> v2: - patch #5: delete `curve25519_null_point' Hui Tang (1): crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930 Meng Yu (5): crypto: hisilicon/hpre - add version adapt to new algorithms crypto: hisilicon/hpr

[PATCH v6 3/6] crypto: hisilicon/hpre - add algorithm type

2021-01-07 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v6 4/6] crypto: expose elliptic curve parameters as Crypto APIs

2021-01-07 Thread Meng Yu
Move elliptic curves definition to 'include/crypto/ecc_curve_defs.h', so all can use it, Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c| 1 - crypto/ecc.h| 37 + crypto/ecc_curve_defs.h

[PATCH v5 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-12-23 Thread Meng Yu
1. Add some new 'ECDH' curve parameter definitions to 'include/crypto/ecc_curve_defs.h', and reorder ECC 'Curves IDs' in 'include/crypto/ecdh.h'; 2. Enable 'ECDH' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu ---

[PATCH v5 3/5] crypto: expose elliptic curve parameters as Crypto APIs

2020-12-23 Thread Meng Yu
Move elliptic curves definition to 'include/crypto/ecc_curve_defs.h', so all can use it, Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c| 1 - crypto/ecc.h| 37 + crypto/ecc_curve_defs.h

[PATCH v5 1/5] crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930

2020-12-23 Thread Meng Yu
From: Hui Tang HPRE of Kunpeng 930 is updated on cluster numbers and configurations of Kunpeng 920 HPRE, so we try to update this driver to make it running okay on both chips. Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h

[PATCH v5 5/5] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2020-12-23 Thread Meng Yu
1. Add 'CURVE25519' curve parameter definition to 'include/crypto/ecc_curve_defs.h'; 2. Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/Kconfig

[PATCH v5 2/5] crypto: hisilicon/hpre - add algorithm type

2020-12-23 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v5 0/5] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2020-12-23 Thread Meng Yu
ms to "include/crypto" v2 -> v3: - patch #5: fix sparse warnings - patch #5: add 'CRYPTO_LIB_CURVE25519_GENERIC' in 'Kconfig' v1 -> v2: - patch #5: delete `curve25519_null_point' Hui Tang (1): crypto: hisilicon/hpre - add some updates to adapt to Kunp

[PATCH v4 5/5] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2020-12-10 Thread Meng Yu
1. Add 'CURVE25519' curve parameter definition to 'include/crypto/ecc_curve_defs.h'; 2. Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/Kconfig

[PATCH v4 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-12-10 Thread Meng Yu
1. Add some new 'ECDH' curve parameter definitions to 'include/crypto/ecc_curve_defs.h', and reorder ECC 'Curves IDs' in 'include/crypto/ecdh.h'; 2. Enable 'ECDH' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu ---

[PATCH v4 2/5] crypto: hisilicon/hpre - add algorithm type

2020-12-10 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v4 1/5] crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930

2020-12-10 Thread Meng Yu
From: Hui Tang HPRE of Kunpeng 930 is updated on cluster numbers and configurations of Kunpeng 920 HPRE, so we try to update this driver to make it running okay on both chips. Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h

[PATCH v4 3/5] crypto: expose elliptic curve parameters as Crypto APIs

2020-12-10 Thread Meng Yu
Move elliptic curves definition to 'include/crypto/ecc_curve_defs.h', so all can use it, Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- crypto/ecc.c| 1 - crypto/ecc.h| 37 + crypto/ecc_curve_defs.h

[PATCH v4 0/5] add ECDH and CURVE25519 algorithms support for Kunpeng 930

2020-12-10 Thread Meng Yu
: add 'CRYPTO_LIB_CURVE25519_GENERIC' in 'Kconfig' v1 -> v2: - patch #5: delete `curve25519_null_point' Hui Tang (1): crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930 Meng Yu (4): crypto: hisilicon/hpre - add algorithm type crypto: expose ellipti

[PATCH v3 2/5] crypto: hisilicon/hpre - add version adapt to new algorithms

2020-11-17 Thread Meng Yu
'DH' and 'RSA' algorithms are supported by Kunpeng 920 and Kunpeng 930, but some new algrithms(like ECDH) are only supported by Kunpeng 930, so we add parameter 'struct hisi_qm *qm' to 'hpre_algs_(un)register' to identify the chip's version.

[PATCH v3 3/5] crypto: hisilicon/hpre - add algorithm type

2020-11-17 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v3 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-11-17 Thread Meng Yu
Enable 'ECDH' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 802 +++- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + 3 fil

[PATCH v3 1/5] crypto: hisilicon/hpre - add initial settings adapt to 'Kunpeng 930'

2020-11-17 Thread Meng Yu
From: Hui Tang HPRE of Kunpeng 930 is updated on cluster numbers and configurations of Kunpeng 920 HPRE, so we try to update this driver to make it running okay on both chips. Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h

[PATCH v3 5/5] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2020-11-17 Thread Meng Yu
Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/Kconfig| 1 + drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_cryp

[PATCH v3 0/5] crypto: hisilicon/hpre - add something for Kunpeng 930

2020-11-17 Thread Meng Yu
point' Hui Tang (1): crypto: hisilicon/hpre - add initial settings adapt to 'Kunpeng 930' Meng Yu (4): crypto: hisilicon/hpre - add version adapt to new algorithms crypto: hisilicon/hpre - add algorithm type crypto: hisilicon/hpre - add 'ECDH' algorithm crypto: hisi

[PATCH v2 3/5] crypto: hisilicon/hpre - add algorithm type

2020-11-01 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH v2 1/5] crypto: hisilicon/hpre - add initial settings adapt to 'Kunpeng 930'

2020-11-01 Thread Meng Yu
on 'Kunpeng 930' in this patch. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h | 8 ++- drivers/crypto/hisilicon/hpre/hpre_main.c | 93 +-- 2 files changed, 68 insertions(+), 33 deletions(-) diff --git a/drivers

[PATCH v2 0/5] crypto: hisilicon/hpre - add something for 'Kunpeng 930'

2020-11-01 Thread Meng Yu
1. Add initial settings, version and new type to adapt 'Kunpeng 930'; 2. Add algorithms(ECDH and CURVE25519) in 'Kunpeng 930'; Hui Tang (1): crypto: hisilicon/hpre - add initial settings adapt to 'Kunpeng 930' Meng Yu (4): crypto: hisilicon/hpre - add version ad

[PATCH v2 5/5] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2020-11-01 Thread Meng Yu
Enable 'CURVE25519' algorithm in 'Kunpeng 930'. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot --- drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_crypto.c | 387 +++- 2 files cha

[PATCH v2 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-11-01 Thread Meng Yu
Enable 'ECDH' algorithm in 'Kunpeng 930'. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 802 +++- drivers/crypto/hisilicon/hpre/hpre_main.c |

[PATCH v2 2/5] crypto: hisilicon/hpre - add version adapt to new algorithms

2020-11-01 Thread Meng Yu
'DH' and 'RSA' algorithms are supported by 'Kunpeng 920' and 'Kunpeng 930', but some new algrithms(like ECDH) are only supported by 'Kunpeng 930', so we add parameter 'struct hisi_qm *qm' to hpre_algs_(un)register to identify the ch

[PATCH 5/5] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2020-10-30 Thread Meng Yu
Enable 'CURVE25519' algorithm in 'Kunpeng 930'. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 + drivers/crypto/hisilicon/hpre/hpre_crypto.c | 390 +++- 2 files changed, 384 insertions(+), 8 deleti

[PATCH 1/5] crypto: hisilicon/hpre - add initial settings adapt to 'Kunpeng 930'

2020-10-30 Thread Meng Yu
on 'Kunpeng 930' in this patch. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h | 8 ++- drivers/crypto/hisilicon/hpre/hpre_main.c | 93 +-- 2 files changed, 68 insertions(+), 33 deletions(-) diff --git a/drivers

[PATCH 2/5] crypto: hisilicon/hpre - add version adapt to new algorithms

2020-10-30 Thread Meng Yu
'DH' and 'RSA' algorithms are supported by 'Kunpeng 920' and 'Kunpeng 930', but some new algrithms(like ECDH) are only supported by 'Kunpeng 930', so we add parameter 'struct hisi_qm *qm' to hpre_algs_(un)register to identify the ch

[PATCH 0/5] crypto: hisilicon/hpre - add something for 'Kunpeng 930'

2020-10-30 Thread Meng Yu
1. Add initial settings, version and new type to adapt 'Kunpeng 930'; 2. Add algorithms(ECDH and CURVE25519) in 'Kunpeng 930'; Hui Tang (1): crypto: hisilicon/hpre - add initial settings adapt to 'Kunpeng 930' Meng Yu (4): crypto: hisilicon/hpre - add version ad

[PATCH 3/5] crypto: hisilicon/hpre - add algorithm type

2020-10-30 Thread Meng Yu
Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 10 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 12 ++-- drivers/crypto/hisilicon/hpre

[PATCH 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-10-30 Thread Meng Yu
Enable 'ECDH' algorithm in 'Kunpeng 930'. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre.h| 2 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 802 +++- drivers/crypto/hisilicon/hpre/hpre_main.c |

[PATCH 3/3] crypto: hisilicon/hpre - fix a bug in dh algorithm

2020-09-10 Thread Meng Yu
x4c as we didn't allocate memory for msg->in. Fixes: c8b4b477079d("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Meng Yu --- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/hisilicon/hpre/hpr

[PATCH 2/3] crypto: hisilicon/hpre - adjust some coding style

2020-09-10 Thread Meng Yu
Adjust some coding style to make code aligned. Signed-off-by: Meng Yu --- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c

[PATCH 1/3] crypto: hisilicon/hpre - delete an useless member

2020-09-10 Thread Meng Yu
Remove unused member 'debug_root' in 'struct hpre_debug'. Fixes: 848974151618("crypto: hisilicon - Add debugfs for HPRE") Fixes: dadbe4c11753("crypto: hisilicon/hpre - update debugfs ...") Signed-off-by: Meng Yu --- drivers/crypto/hisilicon/hpre/hpre.h |

[PATCH 0/3] crypto: hisilicon/hpre - misc clean up and fixes

2020-09-10 Thread Meng Yu
Adjust some tiny coding problems and fix a bug of DH algorithm. Meng Yu (3): crypto: hisilicon/hpre - delete an useless member crypto: hisilicon/hpre - adjust some coding style crypto: hisilicon/hpre - fix a bug in dh algorithm drivers/crypto/hisilicon/hpre/hpre.h| 1 - drivers

[PATCH v2 1/6] crypto: hisilicon/hpre - Init the value of current_q of debugfs

2020-07-10 Thread Meng Yu
Initialize current queue number as HPRE_PF_DEF_Q_NUM, or it is zero and we can't set its value by "current_q_write". Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v2 6/6] crypto: hisilicon/hpre - disable FLR triggered by hardware

2020-07-10 Thread Meng Yu
- add HiSilicon HPRE accelerator") Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre_main.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/driv

[PATCH v2 0/6] crypto: hisilicon/hpre bugfix - misc fixes

2020-07-10 Thread Meng Yu
hardware Meng Yu (4): crypto: hisilicon/hpre - Init the value of current_q of debugfs crypto: hisilicon/hpre - Modify the Macro definition and format crypto: hisilicon/hpre - Add a switch in sriov_configure crypto: hisilicon/hpre - update debugfs interface parameters drivers/crypto/hisilicon

[PATCH v2 3/6] crypto: hisilicon/hpre - Modify the Macro definition and format

2020-07-10 Thread Meng Yu
1. Bit 1 to bit 5 are NFE, not CE. 2. Macro 'HPRE_VF_NUM' is defined in 'qm.h', so delete it here. 3. Delete multiple blank lines. 4. Adjust format alignment. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu --- drivers/crypto/hisilicon/h

[PATCH v2 4/6] crypto: hisilicon/hpre - Add a switch in sriov_configure

2020-07-10 Thread Meng Yu
If CONFIG_PCI_IOV is not enabled, we can not use "sriov_configure". Fixes: 5ec302a364bf("crypto: hisilicon - add SRIOV support for HPRE") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Shukun Tan --- drivers/crypto/hisilicon/hpre/hpre_main.c | 3 ++- 1 file c

[PATCH v2 5/6] crypto: hisilicon/hpre - update debugfs interface parameters

2020-07-10 Thread Meng Yu
Update debugfs interface parameters, and adjust the processing logic inside the corresponding function. Fixes: 848974151618("crypto: hisilicon - Add debugfs for HPRE") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre_m

[PATCH v2 2/6] crypto: hisilicon/hpre - HPRE_OVERTIME_THRHLD can be written by debugfs

2020-07-10 Thread Meng Yu
From: Hui Tang Registers in "hpre_dfx_files" can only be cleaned to zero but HPRE_OVERTIME_THRHLD, which can be written as any number. Fixes: 64a6301ebee7("crypto: hisilicon/hpre - add debugfs for ...") Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo X

[PATCH 5/6] crypto: hisilicon/hpre - update debugfs interface parameters

2020-07-01 Thread Meng Yu
Update debugfs interface parameters, and adjust the processing logic inside the corresponding function. Fixes: 848974151618("crypto: hisilicon - Add debugfs for HPRE") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre_m

[PATCH 1/6] crypto: hisilicon/hpre - Init the value of current_q of debugfs

2020-07-01 Thread Meng Yu
Initialize current queue number as HPRE_PF_DEF_Q_NUM, or it is zero and we can't set its value by "current_q_write". Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 6/6] crypto: hisilicon/hpre - disable FLR triggered by hardware

2020-07-01 Thread Meng Yu
- add HiSilicon HPRE accelerator") Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre_main.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/driv

  1   2   >