Clear shared pages after private-to-shared conversion
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 5 repliesIn review
- v12 patches 6 repliesSuperseded
Changes in v2 from the cover letter
* Switched to use BIT(n) rather than 1 << n in the GICv3 change.
* Added Jason's R-b.
* Patches 2 and 4 are new.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | irqchip/gic-v3-its: Zero shared pages after conversiondrivers/ | +7 | 3 replies | |
| 2/4 | irqchip/gic-v3-its: Allocate VPE tables from sleepable contextdrivers/ | +15 | 1 reply | |
| 3/4 | dma-buf: heaps: Zero system shared heap pages after conversiondrivers/ | +11 | 0 replies | |
| 4/4 | dma-buf: heaps: Fix shared system heap allocation rollbackdrivers/ | +7 | 1 reply |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Jason Gunthorpe |
|---|---|
| 1/4 | R-b |
| 2/4 | |
| 3/4 | R-b |
| 4/4 | 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/4] Clear shared pages after private-to-shared conversion
set_memory_decrypted() doesn't (currently) guarantee to preserve or zero memory, but both the GICv3 ITS driver and the system_cc_shared dma-buf heap currently allocate memory with __GFP_ZERO followed by calling set_memory_decrypted(). On an Arm CCA system with MEC this can cause ciphertext to be visible to the guest rather than the expected zeros.
Patches 1 and 3 fix this by zeroing after the set_memory_decrypted() call.
Patches 2 and 4 fix other related bugs that Sashiko found. Patch 2 fixes the issue that set_memory_decrypted() can be a sleeping call, so moves the allocation out of an atomic context.
Patch 4 deals with the situation where set_memory_decrypted() fails and the rollback path could attempt to re-encrypt memory which was never decrypted.
I've sorted the patches by area, but there's no (semantic) dependency between them.
Changes in v2:
* Switched to use BIT(n) rather than 1 << n in the GICv3 change.
* Added Jason's R-b.
* Patches 2 and 4 are new.
v1: https://lore.kernel.org/r/[email protected]
Steven Price (4):
irqchip/gic-v3-its: Zero shared pages after conversion irqchip/gic-v3-its: Allocate VPE tables from sleepable context
dma-buf: heaps: Zero system shared heap pages after conversion
dma-buf: heaps: Fix shared system heap allocation rollback
drivers/dma-buf/heaps/system_heap.c | 24 +++++++++++++----- drivers/irqchip/irq-gic-v3-its.c | 39 ++++++++++++++++------------- 2 files changed, 40 insertions(+), 23 deletions(-)
Signature · 1 line
2.43.0