diff options
author | Jingbai Ma <jingbai.ma@hp.com> | 2013-10-18 18:53:38 +0900 |
---|---|---|
committer | Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> | 2013-10-18 18:53:38 +0900 |
commit | 8e124174b62376b17ac909bc68622ef07bde6840 (patch) | |
tree | a86b4c602b1c17c68fe045bab2edbc047c78fb01 /diskdump_mod.h | |
parent | 6f6eb408398f4e0ed1dc1fda8d293fbc14b5c087 (diff) |
[PATCH v4] Fix max_mapnr issue on system has over 44-bit addressing.
This patch will fix a bug of makedumpfile doesn't work correctly on system
has over 44-bit addressing in compression dump mode.
This bug was posted here:
http://lists.infradead.org/pipermail/kexec/2013-September/009587.html
This patch will add 3 new fields in struct kdump_sub_header.
unsigned long long start_pfn_64; /* header_version 6 and later */
unsigned long long end_pfn_64; /* header_version 6 and later */
unsigned long long max_mapnr_64; /* header_version 6 and later */
And the old "unsigned int max_mapnr" in struct disk_dump_header will
not be used anymore, but still be there for compatibility purpose.
The max_mapnr_64 only exists in strcut kdump_sub_header, and that only
for compressed kdump format, so for ELF format kdump files (non-compressed),
only the max_mapnr is available, so it still may be truncated for addresses
exceed 44bit (above 16TB).
This patch will change the header_version to 6.
The corresponding patch for crash utility can be found here:
http://lists.infradead.org/pipermail/kexec/2013-October/009750.html
This patch doesn't change sadump_header.
Changelog:
v4:
- Do not change max_mapnr_64 in kdump_sub_header in memory for old kernel.
v3:
- Change notes for max_mapnr, start_pfn and end_pfn as obsolete.
- Remove "(32bit)" from debug messages of max_mapnr, start_pfn and end_pfn.
- Set the 32bit start_pfn and end_pfn to UINT_MAX.
- Remove bitmap writting enhancement to another seperate patch.
- Change type of len_bitmap in struct DumpInfo back to unsigned long.
v2:
- Rename max_mapnr in struct kdump_sub_header to max_mapnr_64.
- Change type of max_mapnr_64 from unsigned long to unsigned long long.
In x86 PAE mode on x86_32 kernel, the address may exceeds 44bit limit.
- Add start_pfn_64, end_pfn_64 for struct kdump_sub_header.
- Only print 64bit start_pfn_64, end_pfn_64 and max_mapnr_64
debug messages for disk dump header version >= 6.
- Change type of bitmap_len in struct DumpInfo, from unsigned long to
unsigned long long.
- Enhance bitmap writting function in reassemble_kdump_header().
Prevent bitmap writting failure if the size of bitmap is too large to
fit a sigle write.
v1:
- http://lists.infradead.org/pipermail/kexec/2013-September/009662.html
Signed-off-by: Jingbai Ma <jingbai.ma@hp.com>
Tested-by: Lisa Mitchell <lisa.mitchell@hp.com>
Diffstat (limited to 'diskdump_mod.h')
-rw-r--r-- | diskdump_mod.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/diskdump_mod.h b/diskdump_mod.h index 00ab852..dd24eb2 100644 --- a/diskdump_mod.h +++ b/diskdump_mod.h @@ -52,7 +52,9 @@ struct disk_dump_header { header in blocks */ unsigned int bitmap_blocks; /* Size of Memory bitmap in block */ - unsigned int max_mapnr; /* = max_mapnr */ + unsigned int max_mapnr; /* = max_mapnr, OBSOLETE! + 32bit only, full 64bit + in sub header. */ unsigned int total_ram_blocks;/* Number of blocks should be written */ unsigned int device_blocks; /* Number of total blocks in @@ -71,14 +73,21 @@ struct kdump_sub_header { unsigned long phys_base; int dump_level; /* header_version 1 and later */ int split; /* header_version 2 and later */ - unsigned long start_pfn; /* header_version 2 and later */ - unsigned long end_pfn; /* header_version 2 and later */ + unsigned long start_pfn; /* header_version 2 and later, + OBSOLETE! 32bit only, full + 64bit in start_pfn_64. */ + unsigned long end_pfn; /* header_version 2 and later, + OBSOLETE! 32bit only, full + 64bit in end_pfn_64. */ off_t offset_vmcoreinfo;/* header_version 3 and later */ unsigned long size_vmcoreinfo; /* header_version 3 and later */ off_t offset_note; /* header_version 4 and later */ unsigned long size_note; /* header_version 4 and later */ off_t offset_eraseinfo; /* header_version 5 and later */ unsigned long size_eraseinfo; /* header_version 5 and later */ + unsigned long long start_pfn_64; /* header_version 6 and later */ + unsigned long long end_pfn_64; /* header_version 6 and later */ + unsigned long long max_mapnr_64; /* header_version 6 and later */ }; /* page flags */ |