mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] crypto: marvell/cesa - Fix hash DMA buffer cleanup
@ 2026-11-18  7:56 Haoxiang Li
  2026-11-18  7:56 ` [PATCH 1/3] crypto: marvell/cesa - Fix DMA cache leaks on hash setup errors Haoxiang Li
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Haoxiang Li @ 2026-11-18  7:56 UTC (permalink / raw)
  To: schalla, bbhushan2, herbert; +Cc: linux-crypto, linux-kernel, Haoxiang Li

This series fixes DMA cache and padding buffer leaks in the CESA hash
request error paths.

The DMA cache is not released when request preparation fails. Padding
cleanup can also be skipped because request type detection depends on a
TDMA chain that has already been cleared. In addition, final requests
rejected by the queue leave their padding allocated.

The patches address these cleanup paths and clear the DMA cache pointer
after freeing it to prevent stale-pointer reuse.

Testing:
- ARM compile testing of hash.o for each intermediate revision, using
  Clang with W=1 and KCFLAGS=-Werror.
- Userspace mock tests of extracted driver functions covering allocation
  failures, queue rejection, backlog acceptance, completion cleanup,
  retries and non-DMA requests.

The mock tests, which is assisted by codex, validate resource lifetimes
with DMA pools and hardware interfaces mocked. No hardware testing was performed.

Haoxiang Li (3):
  crypto: marvell/cesa - Fix DMA cache leaks on hash setup errors
  crypto: marvell/cesa - Fix padding cleanup on hash setup errors
  crypto: marvell/cesa - Free hash padding when queueing fails

 drivers/crypto/marvell/cesa/hash.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
-- 
2.25.1


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18  7:56 [PATCH 0/3] crypto: marvell/cesa - Fix hash DMA buffer cleanup Haoxiang Li
2026-11-18  7:56 ` [PATCH 1/3] crypto: marvell/cesa - Fix DMA cache leaks on hash setup errors Haoxiang Li
2026-11-18  7:56 ` [PATCH 2/3] crypto: marvell/cesa - Fix padding cleanup " Haoxiang Li
2026-11-18  7:56 ` [PATCH 3/3] crypto: marvell/cesa - Free hash padding when queueing fails Haoxiang Li
2026-11-27  5:13 ` [PATCH 0/3] crypto: marvell/cesa - Fix hash DMA buffer cleanup 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®