[PATCH v2 0/5] crypto: hisilicon - improve backlog handling
From: ZongYu Wu
Date: Thu May 28 2026 - 08:02:24 EST
This series improves backlog handling for HiSilicon crypto drivers.
The ZIP and HPRE drivers are extended to support backlog queuing when
the hardware queue is temporarily busy. Instead of failing requests
immediately under hardware congestion, requests can now be queued and
resubmitted when previous requests complete.
In addition, three issues in the hisilicon/sec2 driver have been fixed:
- A UAF problem in the backlog path.
- A resource leak issue in non-backlog mode (The software fallback
mechanism has also been removed).
- When the CTR task is terminated, the IV is restored to ensure that
subsequent tasks use the correct IV.
Changes in v2:
- Obtain the service type through enum, not qp->alg_type.
- Move the backlog list empty check to after the req creation,
as frequently checking and skipping in the send_backlog can
affect performance.
- Fix a resource leak issue in non-backlog mode.
- A fix for the CTR mode issue is added.
- Link to v1: https://lore.kernel.org/all/20260518142956.3593934-1-wuzongyu1@xxxxxxxxxx/
Chenghai Huang (1):
crypto: hisilicon/zip - add backlog support for zip
Wenkai Lin (3):
crypto: hisilicon/sec2 - fix UAF in sec_alg_send_backlog
crypto: hisilicon/sec2 - fix resource leakage issues in non-backlog
mode
crypto: hisilicon/sec2 - restore iv for ctr mode
lizhi (1):
crypto: hisilicon/hpre - implement full backlog support for hpre
driver
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 223 +++++++++++----
drivers/crypto/hisilicon/sec2/sec_crypto.c | 48 ++--
drivers/crypto/hisilicon/zip/zip_crypto.c | 286 +++++++++++++-------
3 files changed, 371 insertions(+), 186 deletions(-)
--
2.33.0