Blame SOURCES/github_b80b16549e24.patch

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