Re: [PATCH] virnuma: Avoid integer overflow in virNumaGetPages()

2023-11-24 Thread Ján Tomko
On a Friday in 2023, Michal Privoznik wrote: On systems with humongous pages (16GiB) and 32bit int it's easy to hit integer overflow in virNumaGetPages(). What happens is, inside of virNumaGetPages() as we process hugepages for given NUMA node (e.g. in order to produce capabilities XML), we keep

[PATCH] virnuma: Avoid integer overflow in virNumaGetPages()

2023-11-24 Thread Michal Privoznik
On systems with humongous pages (16GiB) and 32bit int it's easy to hit integer overflow in virNumaGetPages(). What happens is, inside of virNumaGetPages() as we process hugepages for given NUMA node (e.g. in order to produce capabilities XML), we keep a sum of sizes of pools in an ULL variable (hug