Blame SOURCES/github_b80b16549e24.patch

7294dd
commit b80b16549e24769c7d5fe3a10c4b1a1c4b5161f3
7294dd
Author: Dave Anderson <anderson@redhat.com>
7294dd
Date:   Mon Mar 23 15:52:11 2020 -0400
7294dd
7294dd
    Fix for reading compressed kdump dumpfiles from systems with physical
7294dd
    memory located at extraordinarily high addresses.  In a system with
7294dd
    a physical address range from 0x602770ecf000 to 0x6027ffffffff, the
7294dd
    crash utility fails during session initialization due to an integer
7294dd
    overflow, ending with the error message "crash: vmlinux and vmcore
7294dd
    do not match!".
7294dd
    (chenjialong@huawei.com)
7294dd
7294dd
diff --git crash-7.2.8/diskdump.c crash-7.2.8/diskdump.c
7294dd
index e88243e616cc..328c932dad5a 100644
7294dd
--- crash-7.2.8/diskdump.c
7294dd
+++ crash-7.2.8/diskdump.c
7294dd
@@ -233,7 +233,7 @@ clean_diskdump_data(void)
7294dd
 }
7294dd
 
7294dd
 static inline int 
7294dd
-get_bit(char *map, int byte, int bit)
7294dd
+get_bit(char *map, unsigned long byte, int bit)
7294dd
 {
7294dd
 	return map[byte] & (1<
7294dd
 }
7294dd
@@ -694,7 +694,7 @@ restart:
7294dd
 		dd->max_mapnr = header->max_mapnr;
7294dd
 
7294dd
 	/* read memory bitmap */
7294dd
-	bitmap_len = block_size * header->bitmap_blocks;
7294dd
+	bitmap_len = (off_t)block_size * header->bitmap_blocks;
7294dd
 	dd->bitmap_len = bitmap_len;
7294dd
 
7294dd
 	offset = (off_t)block_size * (1 + header->sub_hdr_size);
7294dd
@@ -744,7 +744,7 @@ restart:
7294dd
 		memcpy(dd->dumpable_bitmap, dd->bitmap, bitmap_len);
7294dd
 
7294dd
 	dd->data_offset
7294dd
-		= (1 + header->sub_hdr_size + header->bitmap_blocks)
7294dd
+		= (1UL + header->sub_hdr_size + header->bitmap_blocks)
7294dd
 		* header->block_size;
7294dd
 
7294dd
 	dd->header = header;