summaryrefslogtreecommitdiff
path: root/purgatory
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2012-11-13 11:38:27 -0500
committerSimon Horman <horms@verge.net.au>2012-11-15 08:18:32 +0900
commit53e81b4ad85ef2b3326a15d54a07e481c44ed17b (patch)
tree4c1b1e1fd1082d53deaa6848b30be6237903c60e /purgatory
parent64283a8f05a2088ea10373ef73cb9560e8b8ec40 (diff)
vmcore-dmesg: Determine correct machine pointer size
A 32bit arch can prepare ELF64 headers. For example for PAE case to preresent file offsets 64bit but data size at the offset still remains 32bit. If we just base our decision based on EI_CLASS, then we will try to read 64bit data from file and can run into various issues. We ran into following issue when we tried to run vmcore-dmesg on a 32bit PAE system vmcore which had 64bit elf headers. No program header covering vaddr 0xc0a6a688c0b89100found kexec bug? Basically we try to read value of log_buf variable from address log_buf_vaddr. We read in 64bit value and then pass that value again to vaddr_to_offset() in an attempt to get to actual log_buf start and get error message. So determine the machine pointer size based on ELF class and arch and read the bytes from file accordingly. v2: Fixed the code as per suggestion from Eric. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Dave Young <dyoung@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
0 files changed, 0 insertions, 0 deletions