mirror of
https://github.com/crash-utility/crash
synced 2025-02-23 17:06:49 +00:00
Fix for Linux 4.10 and later kdump dumpfiles, or kernels that have
backported commit 401721ecd1dcb0a428aa5d6832ee05ffbdbffbbe, titled "kexec: export the value of phys_base instead of symbol address". Without the patch, if the x86_64 "phys_base" value in the VMCOREINFO note is a negative negative decimal number, the crash session fails during session intialization with a "page excluded" or "seek error" when reading "page_offset_base". (anderson@redhat.com)
This commit is contained in:
parent
14cbcd58c1
commit
a4a538caca
11
x86_64.c
11
x86_64.c
@ -6219,11 +6219,14 @@ x86_64_calc_phys_base(void)
|
||||
* Linux 4.10 exports it in VMCOREINFO (finally).
|
||||
*/
|
||||
if ((p1 = pc->read_vmcoreinfo("NUMBER(phys_base)"))) {
|
||||
machdep->machspec->phys_base = dtol(p1, QUIET, NULL);
|
||||
free(p1);
|
||||
if (*p1 == '-')
|
||||
machdep->machspec->phys_base = dtol(p1+1, QUIET, NULL) * -1;
|
||||
else
|
||||
machdep->machspec->phys_base = dtol(p1, QUIET, NULL);
|
||||
if (CRASHDEBUG(1))
|
||||
fprintf(fp, "VMCOREINFO: phys_base: %lx\n",
|
||||
machdep->machspec->phys_base);
|
||||
fprintf(fp, "VMCOREINFO: NUMBER(phys_base): %s -> %lx\n",
|
||||
p1, machdep->machspec->phys_base);
|
||||
free(p1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user