From ebca719c1906bd7bd7f8f6ab0e158be23437c6e2 Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Tue, 20 Oct 2015 11:48:05 -0400 Subject: [PATCH] Fix for bitmap-handling in SADUMP dumpfiles, which associate each bit in a bitmap with a physical page in the reverse order that is used in kdump-compressed format. The bug had not been detected for a long time because bitmaps in SADUMP formats consist mostly of 0x00 and 0xff excluding a very limited amount of memory space for firmware. (indou.takao@jp.fujitsu.com, d.hatayama@jp.fujitsu.com) --- sadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sadump.c b/sadump.c index bc673542..2806521d 100644 --- a/sadump.c +++ b/sadump.c @@ -715,7 +715,7 @@ is_set_bit(char *bitmap, uint64_t pfn) ulong index, bit; index = pfn >> 3; - bit = pfn & 7; + bit = 7 - (pfn & 7); return !!(bitmap[index] & (1UL << bit)); }