crypto: eip93 - return request validation errors synchronously
PATCH 1/1 crypto: eip93 - return request validation errors synchronously
The skcipher and AEAD paths validate requests before submitting them to the hardware. On validation failure they invoke the completion callback and return the same error. Callers handle that return value as a synchronous failure and can complete the request a second time.
Return the validation error directly in both paths. Keep completion callbacks in the hardware result handlers.
Codex (gpt-6.2-sol) assisted with comparing the two paths, preparing the change and writing the changelog. The corresponding OpenWrt 6.18.64 driver object was cross-compiled on MIPS.
--- drivers/crypto/inside-secure/eip93/eip93-aead.c | 4 +--- drivers/crypto/inside-secure/eip93/eip93-cipher.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/crypto/inside-secure/eip93/eip93-aead.c +1 -3
@@ -47,10 +47,8 @@ static int eip93_aead_send_req(struct crypto_async_request *async)int err; err =check_valid_request (rctx); -if (err) { -aead_request_complete (req, err); +if (err)return err; - }return eip93_send_req (async, req->iv, rctx); }
drivers/crypto/inside-secure/eip93/eip93-cipher.c +1 -3
@@ -38,10 +38,8 @@ static int eip93_skcipher_send_req(struct crypto_async_request *async) err =check_valid_request (rctx); -if (err) { -skcipher_request_complete (req, err); +if (err)return err; - }return eip93_send_req (async, req->iv, rctx); }
---
base-commit: 26ca5f34841f0a86d0883664a1c13be89a01d351
change-id: 20261120-eip93-sync-errors-fd700c897151
Best regards,
Signature · 1 line
Gleb Pesin <[email protected]>