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