mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length
@ 2026-11-03  7:52 Wentao Liang
  2026-11-03  9:28 ` Krzysztof Kozlowski
  2026-11-13 13:06 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Wentao Liang @ 2026-11-03  7:52 UTC (permalink / raw)
  To: ayush.sawal, herbert
  Cc: davem, linux-crypto, linux-kernel, Wentao Liang, stable

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")
Cc: stable@vger.kernel.org
Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/crypto/chelsio/chcr_algo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c
index fd4720fa50a9..ac4e40d5292c 100644
--- a/drivers/crypto/chelsio/chcr_algo.c
+++ b/drivers/crypto/chelsio/chcr_algo.c
@@ -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;
 	}
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length
  2026-11-03  7:52 [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length Wentao Liang
@ 2026-11-03  9:28 ` Krzysztof Kozlowski
  2026-11-13 13:06 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-03  9:28 UTC (permalink / raw)
  To: Wentao Liang
  Cc: davem, ayush.sawal, stable, linux-kernel, herbert, linux-crypto


On Tue, 03 Nov 2026 07:52:55 +0000, Wentao Liang wrote:
> 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")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
>  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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length
  2026-11-03  7:52 [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length Wentao Liang
  2026-11-03  9:28 ` Krzysztof Kozlowski
@ 2026-11-13 13:06 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2026-11-13 13:06 UTC (permalink / raw)
  To: Wentao Liang; +Cc: ayush.sawal, davem, linux-crypto, linux-kernel, stable

On Tue, Nov 03, 2026 at 07:52:55AM +0000, Wentao Liang wrote:
> 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")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
>  drivers/crypto/chelsio/chcr_algo.c | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-13 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03  7:52 [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length Wentao Liang
2026-11-03  9:28 ` Krzysztof Kozlowski
2026-11-13 13:06 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®