On Wed, Jul 08, 2026 at 07:54:47PM +0530, Aadeshveer Singh wrote: > > > @@ -4174,14 +4195,14 @@ static void parse_ramblock_mapped_ram(QEMUFile > > > *f, RAMBlock *block, > > > num_pages = length / header.page_size; > > > bitmap_size = BITS_TO_LONGS(num_pages) * sizeof(unsigned long); > > > > Here I think it would still be good to check the page_size is the same as > > what was expected (in this case, guest page size), otherwise we should fail > > because then the bitmap_size may still be unpredictable and it can cause > > illegal access (beyond the size of bitmap allocated) in worst case. > > > Hi Peter, thanks for the review, > Currently mapped_ram_read_header() already enforces header->page_size > == TARGET_PAGE_SIZE and will throw error before reaching this point. > However if you would like an explicit check, let me know.
Ahh, I missed that. Then that would be fine. With that, if you want you can add an assertion here and a comment. But feel free to do whatever you prefer. Thanks, -- Peter Xu
