[PATCH 0/7] iommu/arm-smmu-v3: Fixes reported by Sashiko

Mostafa Saleh posted 7 patches 4 weeks, 1 day ago
There is a newer version of this series
.../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c     | 12 +++++-----
.../iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c  | 19 +++++++++++++---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   | 22 ++++++++++++++-----
3 files changed, 39 insertions(+), 14 deletions(-)
[PATCH 0/7] iommu/arm-smmu-v3: Fixes reported by Sashiko
Posted by Mostafa Saleh 4 weeks, 1 day ago
While running sashiko locally on the pKVM SMMUv3 driver patches, it
reported some pre-existing issues in the SMMUv3 driver (the RB tree
corruption and a missing NULL check) and given that this is not the
first time a pre-existing issue appears in the driver from sashiko,
I went ahead and passed the whole driver to Sashiko which reported a
dozen of other issues(except the last one in this series), I included
fixes for bugs I believe are true or worth fixing (others were mostly
missing NULL checks or bizarre HW/FW configs I don’t think are needed).

I also sorted the patches based on severity from the most critical to
the least, so it is easier to apply a prefix if some bugs are too
theoretical

Mostafa Saleh (7):
  iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs
  iommu/arm-smmu-v3: Prevent rbtree corruption from duplicate streams
  iommu/arm-smmu-v3-iommufd: Fix error path in
    arm_vsmmu_cache_invalidate()
  iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()
  iommu/arm-smmu-v3-test: Add missing error checks for inv array
  iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify()
  iommu/arm-smmu-v3-test: Fix UBSAN error

 .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c     | 12 +++++-----
 .../iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c  | 19 +++++++++++++---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   | 22 ++++++++++++++-----
 3 files changed, 39 insertions(+), 14 deletions(-)

-- 
2.55.0.897.gb25b4bd76c-goog
Re: [PATCH 0/7] iommu/arm-smmu-v3: Fixes reported by Sashiko
Posted by Jason Gunthorpe 2 days, 22 hours ago
On Fri, Aug 28, 2026 at 12:53:35PM +0000, Mostafa Saleh wrote:
> While running sashiko locally on the pKVM SMMUv3 driver patches, it
> reported some pre-existing issues in the SMMUv3 driver (the RB tree
> corruption and a missing NULL check) and given that this is not the
> first time a pre-existing issue appears in the driver from sashiko,
> I went ahead and passed the whole driver to Sashiko which reported a
> dozen of other issues(except the last one in this series), I included
> fixes for bugs I believe are true or worth fixing (others were mostly
> missing NULL checks or bizarre HW/FW configs I don’t think are needed).
> 
> I also sorted the patches based on severity from the most critical to
> the least, so it is easier to apply a prefix if some bugs are too
> theoretical
> 
> Mostafa Saleh (7):
>   iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs
>   iommu/arm-smmu-v3: Prevent rbtree corruption from duplicate streams
>   iommu/arm-smmu-v3-iommufd: Fix error path in
>     arm_vsmmu_cache_invalidate()
>   iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()
>   iommu/arm-smmu-v3-test: Add missing error checks for inv array
>   iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify()
>   iommu/arm-smmu-v3-test: Fix UBSAN error

Does this need a respin? At least the 3rd patch there should no go
as the iommufd tree has a different version of that fix now

Jason
Re: [PATCH 0/7] iommu/arm-smmu-v3: Fixes reported by Sashiko
Posted by Mostafa Saleh 2 days, 13 hours ago
On Wed, Sep 23, 2026 at 09:03:44PM -0300, Jason Gunthorpe wrote:
> On Fri, Aug 28, 2026 at 12:53:35PM +0000, Mostafa Saleh wrote:
> > While running sashiko locally on the pKVM SMMUv3 driver patches, it
> > reported some pre-existing issues in the SMMUv3 driver (the RB tree
> > corruption and a missing NULL check) and given that this is not the
> > first time a pre-existing issue appears in the driver from sashiko,
> > I went ahead and passed the whole driver to Sashiko which reported a
> > dozen of other issues(except the last one in this series), I included
> > fixes for bugs I believe are true or worth fixing (others were mostly
> > missing NULL checks or bizarre HW/FW configs I don’t think are needed).
> > 
> > I also sorted the patches based on severity from the most critical to
> > the least, so it is easier to apply a prefix if some bugs are too
> > theoretical
> > 
> > Mostafa Saleh (7):
> >   iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs
> >   iommu/arm-smmu-v3: Prevent rbtree corruption from duplicate streams
> >   iommu/arm-smmu-v3-iommufd: Fix error path in
> >     arm_vsmmu_cache_invalidate()
> >   iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()
> >   iommu/arm-smmu-v3-test: Add missing error checks for inv array
> >   iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify()
> >   iommu/arm-smmu-v3-test: Fix UBSAN error
> 
> Does this need a respin? At least the 3rd patch there should no go
> as the iommufd tree has a different version of that fix now

Yes, I will respin shortly, I will also drop patch 2 as  Nicolin
posted a new version of his patch.

Thanks,
Mostafa

> 
> Jason