Re: [v2 PATCH] iommu/arm-smmu-v3: Fix L1 stream table index calculation for 32-bit sid size
From: Jason Gunthorpe
Date: Fri Oct 04 2024 - 12:41:43 EST
On Fri, Oct 04, 2024 at 09:37:10AM -0700, Yang Shi wrote:
>
> size = num_sids * sizeof(struct arm_smmu_ste);
> + if (size > SIZE_4G)
> + return -EINVAL;
If you want to do it like that then 'size >= SIZE_MAX' is the right
expression
Jason