Re: [PATCH 6/7] iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify()

From: Jason Gunthorpe

Date: Fri Aug 28 2026 - 10:28:05 EST


On Fri, 28 Aug 2026 12:53:41 +0000, Mostafa Saleh <smostafa@xxxxxxxxxx> wrote:
> arm_smmu_v3_invs_test_verify() validates the array bounds using
> KUNIT_EXPECT_EQ(), which triggers a failure and continues execution.
> If invs->num_invs was smaller than expected, the next loop over
> num_invs would blindly read past the end of the invs->inv[] array.
> Switch to KUNIT_ASSERT_EQ() to fail and stop the test on bound errors.
>
>
> [...]

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

--
Jason