aspeed/hace: Fix mapped address may not be unmapped issue
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 0 repliesNew
- v11 patch 7 repliesSuperseded
Changes in v2 from the cover letter
- Adjust commit message
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | aspeed/hace: Fix mapped address may not be unmapped issuehw/ | +45 | 0 replies |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Jamin Lin |
|---|---|
| 1/1 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/1] aspeed/hace: Fix mapped address may not be unmapped issue
Dear reviewer,
The Aspeed HACE hash flow may leave DMA mappings active when an error occurs after guest buffers have already been mapped.
Several failure paths return early without unmapping previously mapped iov entries. This can lead to stale mappings and resource leaks.
Fix this by introducing a common cleanup helper that unmaps all previously mapped iov entries before returning from error paths.
Additionally, track the actual mapped length of each iov entry explicitly. This is necessary because some hashing flows may apply padding during processing, and the resulting buffer length used later in the flow can differ from the original DMA mapped length. Using the modified length during dma_memory_unmap() may result in an incorrect unmap size.
Note: this patch series is based on
https://patchew.org/QEMU/[email protected]/.
Best Regards,
Kane
---
ChangeLog
---------
v2:
- Adjust commit message
v1:
- Initial version
---
Kane-Chen-AS (1):
aspeed/hace: Fix mapped address may not be unmapped issue
hw/misc/aspeed_hace.c | 63 ++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0