[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241004164130.GK2456194@ziepe.ca>
Date: Fri, 4 Oct 2024 13:41:30 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Yang Shi <yang@...amperecomputing.com>
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 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
Powered by blists - more mailing lists