[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] xvmalloc: extend to cover 2-dimensional arrays
Hi Jan, On 10/07/2025 12:02, Jan Beulich wrote: Take care of the multiplication(s) involved in determining overall size in the macros themselves, saturating to ULONG_MAX. This way on 64-bit systems the subsequent check against UINT_MAX will fail, while on 32- bit systems allocations of this size simply cannot be fulfilled anyway (such an allocation would consume the entire address space). The only place where we truly consume guest input (but constrained to hwdom) is cpufreq_statistic_init(). Play safe however and convert the other three instances where a multiplication is involved as well. While touching those sites also switch to xv*alloc_array(), following what was settled upon when those were introduced. Don't bother extending x*alloc_array() the same way. Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |