From b7ac46b98baab09020665f3c1bfc14f6ac642299 Mon Sep 17 00:00:00 2001 From: Mikhail Zaslonko Date: Fri, 27 Sep 2024 14:33:45 +0200 Subject: [PATCH] zdump/dfi_vmdump: Fix Index Page processing for vmdump DFI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to vmdump format, each bit of the Index page represents a Bit-Key page and indicates if that Bit-Key page exists. Due to the bug in vmdump64big_init() only 4096 bits of the Index Page were processed instead of 32768. Thus for vmdumps of guests with defined storage above 64G we could have invalid memory_start_record calculated. This ruins the VMDUMP mem chunk read callback function. One of the problem symptoms reported was missing UTS data in 'zgetdump -i' output caused by inability to locate OS_INFO in the dump. Fixes: 067dd5c7efd1 ("zdump: Add vmdump dfi for vmdump format to elf format") Signed-off-by: Mikhail Zaslonko Signed-off-by: Mikhail Zaslonko Reviewed-by: Thomas Richter Signed-off-by: Jan Höppner --- zdump/dfi_vmdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zdump/dfi_vmdump.c b/zdump/dfi_vmdump.c index 4e4d3c74..fd8ced80 100644 --- a/zdump/dfi_vmdump.c +++ b/zdump/dfi_vmdump.c @@ -201,7 +201,7 @@ static void vmdump64big_init(void) zg_read(g.fh, bm_index_page, sizeof(bm_index_page), ZG_CHECK); l.memory_start_record += PAGE_SIZE; - for (i = 0; i < PAGE_SIZE; i++) { + for (i = 0; i < 8 * PAGE_SIZE; i++) { if (test_page_bit(bm_index_page, i)) { u8 bm_page[PAGE_SIZE];