[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9a714b1a-f33f-4439-ab32-3ae359fb5033@os.amperecomputing.com>
Date: Fri, 4 Oct 2024 09:46:33 -0700
From: Yang Shi <yang@...amperecomputing.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Nicolin Chen <nicolinc@...dia.com>, james.morse@....com, will@...nel.org,
robin.murphy@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [v2 PATCH] iommu/arm-smmu-v3: Fix L1 stream table index
calculation for 32-bit sid size
On 10/4/24 9:41 AM, Jason Gunthorpe wrote:
> 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
Thank you. Will take it.
And with the size check we don't need to check smmu->sid_bits.
>
> Jason
Powered by blists - more mailing lists