Skip to content

SMMUV3: STE lookup fixes

Eric Auger qemu-arm qemu-devel 2 versions – Applied

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

  1. v3 Latest5 patches 3 repliesApplied
  2. v25 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- Introduced STE_SIZE and L1STD_SIZE
- Just cap strtab_size to 64

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5hw/arm/smmuv3: Fix off-by-one bug in alignment strtab maskhw/arm/smmuv3-internal.h hw/arm/smmuv3.c+8 -51 reply
2/5hw/arm/smmuv3: Sanitize SMMU_S_STRTAB_BASE_CFG.SPLIThw/arm/smmuv3.c+7 -00 replies
3/5hw/arm/smmuv3: Fix possible overflow in strtab_base computationhw/arm/smmuv3.c+1 -01 reply
4/5hw/arm/smmuv3: Check L1STD.SPANhw/arm/smmuv3.c+11 -10 replies
5/5hw/arm/smmuv3: Enforce alignment of L2Ptr according to the spanhw/arm/smmuv3.c+2 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchShameer Kolothum
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] SMMUV3: STE lookup fixes

The current code fails to sanitize SMMU_S_STRTAB_BASE_CFG LOG2SIZE and SPLIT which are used in the STE lookup. This could potentially lead to wrong shifts/masks in smmu_find_ste() and does not fully comply with the spec.

Also the series fixes different issues related to strtab base address alignment computations: off-by-one mask, unchecked span, missing L2ptr base address alignment. Those issues were not visible because the guest kernel does what it should but better comply with the spec.

Best Regards

Eric

This series is available at:
https://github.com/eauger/qemu/tree/smmu_sanitize_v3

v2 -> v3:
- Introduced STE_SIZE and L1STD_SIZE
- Just cap strtab_size to 64

Eric Auger (5):
hw/arm/smmuv3: Fix off-by-one bug in alignment strtab mask hw/arm/smmuv3: Sanitize SMMU_S_STRTAB_BASE_CFG.SPLIT hw/arm/smmuv3: Fix possible overflow in strtab_base computation hw/arm/smmuv3: Check L1STD.SPAN
hw/arm/smmuv3: Enforce alignment of L2Ptr according to the span

 hw/arm/smmuv3-internal.h |  3 +++
 hw/arm/smmuv3.c          | 32 ++++++++++++++++++++++++++------
 2 files changed, 29 insertions(+), 6 deletions(-)
Signature · 1 line
2.53.0