On 16.09.2021 22:47, Stefano Stabellini wrote: > acquire_domstatic_pages currently takes an unsigned long nr_mfns > parameter, but actually it cannot handle anything larger than an > unsigned int nr_mfns. That's because acquire_domstatic_pages is based on > assign_pages which also takes an unsigned int nr parameter. > > So modify the nr_mfns parameter of acquire_domstatic_pages to be > unsigned int. > > There is only one caller in > xen/arch/arm/domain_build.c:allocate_static_memory. Check that the value > to be passed to acquire_domstatic_pages is no larger than UINT_MAX. If > it is, print an error and goto fail. > > Signed-off-by: Stefano Stabellini <[email protected]> > --- > > Jan, I took your suggestion of moving the check closer to where the > value is read from DT. At that point I also took the opportunity to > change acquire_domstatic_pages to take an unsigned int parameter > instead of unsigned long.
Fine by me; fwiw Acked-by: Jan Beulich <[email protected]> Jan
