Skip to contentSkip to conversation

kdump: Trouble reading /dev/oldmem from capture kernel

DISCUSSION Seemanta Dutta 2 participants 2 messages Aug 5, 2011 – Aug 9, 2011

lore
Share & tools
lore
#0 lore raw

Greetings kernel hackers,

I am trying to dump the raw memory from the /dev/oldmem device from within a kexec()'ed capture kernel. But it seems to be that I can only read 4k of data from /dev/oldmem. I am following the kdump documentation given in:
http://www.mjmwired.net/kernel/Documentation/kdump/. And according to the documentation in the above link, /dev/oldmem *should* present the raw view of memory.

Some details about my scenario:
1. Production kernel panics, and I boot into the dump capture kernel without any issues.

2. Dump capture kernel provides two interfaces to access 'old' kernel memory (as per kdump dpcumentation): /dev/oldmem and /proc/vmcore. The latter works perfectly. But I am more interested in the raw memory, rather than the core file.

My expectation in this scenario was that I would be able to access entire physical RAM using the /dev/oldmem device. But turns out, I can't.

I would be grateful if anyone pointed out if I was doing something wrong or missing something.

This is happening over ARM. Could that have to do something with this ? Not sure if the ARM integration of KDUMP/KEXEC has something to do with it.

Your help would be greatly appreciated!

regards,
Seemanta

--

Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

#1 lore raw
Quoted 5 lines · Seemanta Dutta

2. Dump capture kernel provides two interfaces to access 'old' kernel memory (as per kdump dpcumentation): /dev/oldmem and /proc/vmcore. The latter works perfectly. But I am more interested in the raw memory, rather than the core file.

Is there some specific reason to use /dev/oldmem instead? At least I've never needed that interface. crash utility works pretty well with /dev/vmcore.

Quoted 9 lines

My expectation in this scenario was that I would be able to access entire physical RAM using the /dev/oldmem device. But turns out, I can't.

I would be grateful if anyone pointed out if I was doing something wrong or missing something.

This is happening over ARM. Could that have to do something with this ? Not sure if the ARM integration of KDUMP/KEXEC has something to do with it.

I haven't tried lately but it looks like ARM is missing setting of 'saved_max_pfn' which could explain why it works that way.