* [BUG REPORT] kexec and makedumpfile can't detect PAGE_OFFSET on arm
@ 2014-05-19 11:59 Wang Nan
0 siblings, 0 replies; only message in thread
From: Wang Nan @ 2014-05-19 11:59 UTC (permalink / raw)
To: Atsushi Kumagai, Simon Horman, kexec@lists.infradead.org
Hi Atsushi and Simon,
I find a problem about VMSPLIT on arm plarform, related to kexec and
makedumpfile.
When CONFIG_VMSPLIT_1G/2G is selected by kernel, PAGE_OFFSET is actually
0x40000000 or 0x80000000. However, kexec hard codes PAGE_OFFSET to
0xc0000000 (in kexec/arch/arm/crashdump-arm.h), which is incorrect in
these situations. For example, on realview-pbx board with 1G/3G VMSPLIT,
PHDRs in generated /proc/vmcore is as follow:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
NOTE 0x001000 0x00000000 0x00000000 0x00690 0x00690 0
LOAD 0x002000 0xc0000000 0x00000000 0x10000000 0x10000000 RWE 0
LOAD 0x10002000 0xe0000000 0x20000000 0x8000000 0x8000000 RWE 0
LOAD 0x18002000 0xf0000000 0x30000000 0x10000000 0x10000000 RWE 0
LOAD 0x28002000 0x40000000 0x80000000 0x10000000 0x10000000 RWE 0
Which should be:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
...
LOAD ... 0x40000000 0x00000000 0x10000000 0x10000000 RWE 0
LOAD ... 0x60000000 0x20000000 0x8000000 0x8000000 RWE 0
LOAD ... 0x70000000 0x30000000 0x10000000 0x10000000 RWE 0
LOAD ... 0xc0000000 0x80000000 0x10000000 0x10000000 RWE 0
I don't know why crash utility can deal with it without problem, but in
makedumpfile such VMSPLIT setting causes segfault:
$ ./makedumpfile -c -d 31 /proc/vmcore ./out -f
The kernel version is not supported.
The created dumpfile may be incomplete.
Excluding unnecessary pages : [ 0.0 %] /Segmentation fault
There are many ways to deal with it, I want discuss them in the maillist and
make a decision:
1. Kexec changes, detect PAGE_OFFSET dynamically. However, I don't know
whether there is a reliably way for this purpose, here I suggest
kernel to export PAGE_OFFSET through sysfs, such as
/sys/kernel/page_offset.
2. Or, kexec accepts PAGE_OFFSET as a command line arguments, let user
provide correct information.
3. Or, makedumpfile changes, don't trust EHDR anymore. Kernel should
export PAGE_OFFSET through VMCOREINFO.
How do you feel?
Thank you!
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-19 12:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 11:59 [BUG REPORT] kexec and makedumpfile can't detect PAGE_OFFSET on arm Wang Nan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.