RFC physmem: Have flaview API check bus permission from MemTxAttrs argument
Status from this message: Applied to target-arm.next, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 RFC Latest3 patches 11 repliesApplied
- v2 RFC5 patches 33 repliesSuperseded
Since v1 ("hw: Forbid DMA write accesses to MMIO regions") [2] from the cover letter
- rewrite based on Peter / Stefan feedbacks
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERRORhw/ | +2 | 2 replies | |
| 2/3 | softmmu/physmem: Simplify flatview_write and address_space_access_validsoftmmu/ | +3 | 0 replies | |
| 3/3 | softmmu/physmem: Introduce MemTxAttrs::memory field and MEMTX_BUS_ERRORinclude/ softmmu/ | +50 | 6 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Peter Xu | David Hildenbrand | Peter Maydell | Stefan Hajnoczi | Alexander Bulekov | Richard Henderson |
|---|---|---|---|---|---|---|
| 1/3 | R-b | R-b | R-b | R-b | ||
| 2/3 | R-b | R-b | R-b | R-b | ||
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [RFC PATCH v3 0/3] physmem: Have flaview API check bus permission from MemTxAttrs argument
This series aim to kill a recent class of bug, the infamous "DMA reentrancy" issues found by Alexander while fuzzing.
Introduce the 'memory' field in MemTxAttrs, allowing to restrict a controller to memories (and not devices).
If a transaction permission is not allowed (for example access to device), we return the specific MEMTX_BUS_ERROR.
Permissions are checked in after the flatview is resolved, and before the access is done, in a new function: flatview_access_allowed().
Since v2 [1]:
- Addressed review comments:
- reword arm_gicv3 description (pm215)
- merged patches 3/4/5 (peterx & dhildenb)
- simplify flatview_access_allowed() logic (stefanha)
- drop MEMTXPERM enum and reword following AMBA terminology (edgar)
Since v1 ("hw: Forbid DMA write accesses to MMIO regions") [2]:
- rewrite based on Peter / Stefan feedbacks
Based on "hw: Let the DMA API take a MemTxAttrs argument" [3].
Based-on: <[email protected]>
[1] https://www.mail-archive.com/[email protected]/msg831168.html
[2] https://www.mail-archive.com/[email protected]/msg72924.html
[3] https://www.mail-archive.com/[email protected]/msg820359.html
Philippe Mathieu-Daudé (3):
hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR softmmu/physmem: Simplify flatview_write and
address_space_access_valid
softmmu/physmem: Introduce MemTxAttrs::memory field and
MEMTX_BUS_ERROR
include/exec/memattrs.h | 9 +++++++ hw/intc/arm_gicv3_redist.c | 4 +-- softmmu/physmem.c | 54 +++++++++++++++++++++++++++++++------- 3 files changed, 55 insertions(+), 12 deletions(-)
Signature · 1 line
2.33.1