From: "Magnus Damm" <magnus.damm@gmail.com>
To: linux-ia64@vger.kernel.org
Subject: Re: Zero size /proc/vmcore on ia64
Date: Wed, 14 Feb 2007 11:46:49 +0000 [thread overview]
Message-ID: <aec7e5c30702140346k689a418aoc43143fc592ab757@mail.gmail.com> (raw)
In-Reply-To: <20070205015901.GA31446@verge.net.au>
On 2/14/07, Zou, Nanhai <nanhai.zou@intel.com> wrote:
> > From: Magnus Damm [mailto:magnus.damm@gmail.com]
> > On 2/8/07, Vivek Goyal <vgoyal@in.ibm.com> wrote:
> > > I think we should not remove this check because even to parse the info
> > > passed in ELF headers, you need to first read the ELF headers from crashed
> > > kernel's memory. So if some programming error has passed wrong location of
> > > ELF headers (elfcoreheader= invalid location) then we might try reading the
> > > elf header from a non-existing physical page frame.
> >
> > Are you saying that the ELF header is located in the memory space of
> > the first kernel?
> >
> > The way I read the code the ELF header is put into the reserved memory
> > space for the secondary kernel. At least on ia64 that is true, and I
> > think the same goes for i386.
> >
> > And the fact that the ELF header is put in to the secondary kernel
> > brings me memory setup problems on ia64.
> >
> > Basically the ELF header is marked as EFI_UNUSABLE_MEMORY by the EFI
> > mangling code in purgatory. The secondary kernel detects this while
> > parsing the EFI tables and refuses to use/map the other memory present
> > in the same 16M granule. And in my case the initramfs happens to be
> > located in the same granule... boom! No good. =)
> >
> > So I'm wondering about the reason why we put the ELF header in the
> > secondary kernel. Can't we just put it in the first kernel and be done
> > with it? We still point it out using the kernel command line, don't
> > we?
>
> My first design is that putting data in second kernel is easy and safer. We could put it in the first kernel if we provide an interface to reserve this area at the time of kexec -p so that nobody will touch it even at the time of crash.
Maybe that's a good idea. But that would make ia64 a special case and
I'd like to avoid that as long as possible.
> Align that buffer to 16M will solve the issue but that seems to be a waste of the useful memory?
Right. We could require one granule per segment or something, but at
load time we don't really know if the secondary kernel is using 16M or
64M granules. A safe bet would be to always use 64M, but that would
require us to use quite a lot of memory for the secondary kernel.
> Another way is append this elf header to command line in purgatory, like we append the ummy efi function, maybe this is too hacky?
Hm. I think that sounds a bit too hackish. =)
What about the option of marking the ELF headers as EFI_LOADER_DATA
and let the secondary kernel allocate new space and copy the data
early during boot?
Thanks!
/ magnus
next prev parent reply other threads:[~2007-02-14 11:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 1:59 Zero size /proc/vmcore on ia64 Horms
2007-02-08 2:07 ` Zou, Nanhai
2007-02-08 3:06 ` Horms
2007-02-08 4:21 ` Zou Nan hai
2007-02-08 5:46 ` Vivek Goyal
2007-02-08 7:36 ` Horms
2007-02-08 7:52 ` Zou, Nanhai
2007-02-08 13:07 ` Horms
2007-02-08 23:45 ` Zou, Nanhai
2007-02-13 17:25 ` Bernhard Walle
2007-02-14 8:27 ` Magnus Damm
2007-02-14 9:57 ` Zou, Nanhai
2007-02-14 11:46 ` Magnus Damm [this message]
2007-02-15 2:06 ` Zou, Nanhai
2007-02-15 2:17 ` Zou, Nanhai
2007-02-15 3:46 ` Horms
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aec7e5c30702140346k689a418aoc43143fc592ab757@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox