[v2 PATCH] iommu/arm-smmu-v3: Fix L1 stream table index calculation for 32-bit sid size

Jason Gunthorpe jgg at ziepe.ca
Fri Oct 4 09:41:30 PDT 2024


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



More information about the linux-arm-kernel mailing list