Re: [PATCH] Updated /proc/iomem patch

Khalid Aziz
2005-09-15T17:27:44Z

On Thu, 2005-09-15 at 10:46 -0600, Bjorn Helgaas wrote:
> On Thursday 15 September 2005 10:26 am, Khalid Aziz wrote:
> > I am not sure if marking the memory allocated by bootloader for kernel,
> > inital ramdisk, EFI memory map and boot parameters as "reserved"
> > in /proc/iomem is the right thing to do. I have done it this way in the
> > patch but I would appreciate other opinions.
>
> I'm curious about how kexec-tools uses the information from iomem.
> It tells you about physical address space, and you can't do much
> with physical addresses from user-space. I suppose it's obvious
> from the kexec-tools source -- do you have a pointer?

As kexec tools reads various segments from the kernel image file, it
reads their final memory address where they should be loaded ina nd
attempts to verify if those addresses are valid. This is where it uses
information from /proc/iomem to determine if load addresses are indeed
real memory. This check prevents bad image from being loaded which kexec
will then try to execute later on kexec -e.

You can get kexec-tools sources from
<http://www.xmission.com/~ebiederm/files/kexec/>, or for Debian
unstable, simply "apt-get source kexec-tools" will pull the sources
down.

--
Khalid

==================================