Skip to contentSkip to conversation

crypto/ccp: crash when using ccp cpu authentication is used

PATCH In review [email protected] 3 participants 4 messages Oct 15, 2019 – Oct 22, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 crypto/ccp: crash when using ccp cpu authentication is used

From: Amaranath Somalapuram <[email protected]>

when ccp_auth_opt=1 is set and
if authentication error occurred ccp driver crash.
proble is enqueue count and dequeue count miss match if we continue.
Cc: [email protected]

---
 drivers/crypto/ccp/ccp_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/ccp/ccp_crypto.c +1 -1
index 19ae9153d..1837c8543 100644
@@ -2738,7 +2738,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
 							 session, auth_ctx);
 				if (op[i]->status !=
 				    RTE_CRYPTO_OP_STATUS_SUCCESS)
-					continue;
+					CCP_LOG_ERR("RTE_CRYPTO_OP_STATUS_AUTH_FAILED");
 			} else
 				result = ccp_crypto_auth(op[i], cmd_q, b_info);
 
Signature · 1 line
2.17.1
#1 lore raw

Title: crypto/ccp: fix CPU authentication crash

Quoted 6 lines

From: Amaranath Somalapuram <[email protected]>

when ccp_auth_opt=1 is set and
if authentication error occurred ccp driver crash.
proble is enqueue count and dequeue count miss match if we continue.

Please rephrase this description.

Fixes line??

Quoted 23 lines
---
 drivers/crypto/ccp/ccp_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/ccp/ccp_crypto.c +1 -2
index 19ae9153d..1837c8543 100644
@@ -2738,7 +2738,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
 							 session, auth_ctx);
 				if (op[i]->status !=
 				    RTE_CRYPTO_OP_STATUS_SUCCESS)
-					continue;
+
 	CCP_LOG_ERR("RTE_CRYPTO_OP_STATUS_AUTH_FAILED");
 			} else
 				result = ccp_crypto_auth(op[i], cmd_q, b_info);
 
--

2.17.1

#2 lore raw

Hi Akhil,

Not sure about how to use fix line if I don't have bug number.

If I run ./devtools/check-git-log.sh it expect bug number. Do you recommend to log a bug for my patches ??

Please let me know.

Regards,
S.Amarnath

-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Tuesday, October 15, 2019 4:31 PM
To: Somalapuram, Amaranath <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [PATCH v1 3/6] crypto/ccp: crash when using ccp cpu authentication is used

[CAUTION: External Email]

Title: crypto/ccp: fix CPU authentication crash

Quoted 6 lines

From: Amaranath Somalapuram <[email protected]>

when ccp_auth_opt=1 is set and
if authentication error occurred ccp driver crash.
proble is enqueue count and dequeue count miss match if we continue.

Please rephrase this description.

Fixes line??

Quoted 24 lines
---
 drivers/crypto/ccp/ccp_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/crypto/ccp/ccp_crypto.c index 19ae9153d..1837c8543 100644

drivers/crypto/ccp/ccp_crypto.c +1 -1
@@ -2738,7 +2738,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
                                                       session, auth_ctx);
                              if (op[i]->status !=
                                  RTE_CRYPTO_OP_STATUS_SUCCESS)
-                                     continue;
+
      CCP_LOG_ERR("RTE_CRYPTO_OP_STATUS_AUTH_FAILED");
                      } else
                              result = ccp_crypto_auth(op[i], cmd_q, 

b_info);

--
2.17.1

#3 lore raw

Hi,

Please refer coding guidelines at https://doc.dpdk.org/guides/contributing/patches.html
Here is the example of a fix commit. In this "abcdefgh1234" is the commit id which introduced this issue. You can check the commit id of the changed commit using git blame <file name>.

doc: fix some parameter description

Update the docs, fixing description of some parameter.

Fixes abcdefgh1234 ("doc: add some parameter")
Quoted 59 lines

Hi Akhil,

Not sure about how to use fix line if I don't have bug number.

If I run ./devtools/check-git-log.sh it expect bug number. Do you recommend to log a bug for my patches ??

Please let me know.

Regards,
S.Amarnath

-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Tuesday, October 15, 2019 4:31 PM
To: Somalapuram, Amaranath <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [PATCH v1 3/6] crypto/ccp: crash when using ccp cpu authentication is used

[CAUTION: External Email]

Title: crypto/ccp: fix CPU authentication crash

Quoted 6 lines

From: Amaranath Somalapuram <[email protected]>

when ccp_auth_opt=1 is set and
if authentication error occurred ccp driver crash.
proble is enqueue count and dequeue count miss match if we continue.

Please rephrase this description.

Fixes line??

Quoted 24 lines
---
 drivers/crypto/ccp/ccp_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/crypto/ccp/ccp_crypto.c index 19ae9153d..1837c8543 100644

drivers/crypto/ccp/ccp_crypto.c +1 -1
@@ -2738,7 +2738,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
                                                       session, auth_ctx);
                              if (op[i]->status !=
                                  RTE_CRYPTO_OP_STATUS_SUCCESS)
-                                     continue;
+
      CCP_LOG_ERR("RTE_CRYPTO_OP_STATUS_AUTH_FAILED");
                      } else
                              result = ccp_crypto_auth(op[i], cmd_q,

b_info);

--
2.17.1