Skip to contentSkip to conversation

crypto: chcr - Balance inflight count on invalid RFC4106 AAD length

PATCH In review Wentao Liang 2 participants 2 messages Nov 3

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

PATCH 1/1 crypto: chcr - Balance inflight count on invalid RFC4106 AAD length

chcr_aead_op() increments the device inflight counter before checking the RFC4106 associated data length. If the length is invalid, it returns -EINVAL without submitting a request or decrementing the counter. No completion can balance that increment, so device teardown keeps seeing an outstanding request.

Decrement the counter before returning from this validation failure, matching the other synchronous error exits after chcr_inc_wrcount().

Fixes d91a3159e8d9 ("Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests")
Assisted-by DeepSeek-V4.1-Flash and OpenAI Codex
---
 drivers/crypto/chelsio/chcr_algo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/chelsio/chcr_algo.c +1 -0
index fd4720fa50a9..ac4e40d5292c 100644
@@ -3651,6 +3651,7 @@ static int chcr_aead_op(struct aead_request *req,
 	    crypto_ipsec_check_assoclen(req->assoclen) != 0) {
 		pr_err("RFC4106: Invalid value of assoclen %d\n",
 		       req->assoclen);
+		chcr_dec_wrcount(cdev);
 		return -EINVAL;
 	}
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines · Wentao Liang

chcr_aead_op() increments the device inflight counter before checking the RFC4106 associated data length. If the length is invalid, it returns -EINVAL without submitting a request or decrementing the counter. No completion can balance that increment, so device teardown keeps seeing an outstanding request.

Decrement the counter before returning from this validation failure, matching the other synchronous error exits after chcr_inc_wrcount().

Quoted 8 lines
Fixes d91a3159e8d9 ("Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests")
Assisted-by DeepSeek-V4.1-Flash and OpenAI Codex
---
 drivers/crypto/chelsio/chcr_algo.c | 1 +
 1 file changed, 1 insertion(+)

Multiple things here:
1. Your team ignored completely previous feedback. Multiple times.

2. You use multiple identities with this email address, thus I doubt that we speak with an actual person.

3. Your bot does not even bother running checkpatch, right?

4. Nothing of this was reproduced nor tested.

5. Finally, the same feedback:
You sent multiple independent patches, to multiple independent subsystems. The amount of these patches clearly suggest this was AI generated and most likely not tested.

More importantly, you sent all this work without properly organizing relevant patches into patchsets. This makes reviewing difficult and might cause multiple reviewers to address the same issue. Replying to the entire set is impossible and requires handling each patch independently, instead of applying or discarding the set. Maintainers also won't see the bigger picture of your work. Quite worrying.

This is on the verge of hostile patch: bomb us with so many contributions, we won't be able to handle them in efficient manner, like responding ONCE to ask you to slow down. Considering all this is untested and LLM generated, I have even more doubts whether this should be considered for review.

Please read kernel documentation BEFORE posting more work. It will explain you how to identify subsystems, how to organize your work per subsystem (so a patchset grouping multiple patches with a short cover letter), how to document the issue discovery method and what was or was not tested.

Best regards,
Krzysztof