From: Olaf Hering <olaf@aepfle.de>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jan Beulich <JBeulich@suse.com>,
xen-devel@lists.xensource.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, Daniel Kiper <dkiper@net-space.pl>
Subject: Re: [Xen-devel] incorrect layout of globals from head_64.S during kexec boot
Date: Tue, 10 Jul 2012 20:09:53 +0200 [thread overview]
Message-ID: <20120710180953.GB20075@aepfle.de> (raw)
In-Reply-To: <20120710172626.GA6868@phenom.dumpdata.com>
On Tue, Jul 10, Konrad Rzeszutek Wilk wrote:
> On Tue, Jul 10, 2012 at 05:23:08PM +0200, Olaf Hering wrote:
> > I was not thinking of statically allocated pages but some new concept of
> > allocating such shared pages. Shouldnt there be some dedicated area in
> > the E820 table which has to be used during the whole life time of the
> > guest?
>
> Not that I can see. But I don't see why that could not be added? Perhaps
> the HVM loader can make it happen? But then how would it tell the kernel
> that this E820_RESERVED is the shared_info one. Not the other ones..
Maybe just use a new E820 type for this sort of thing? Its just the
question wether some other OS can cope with an unknown type. From my
reading of the e820 related code a region with an unknown type is just
ignored.
> > Are there more shared areas or is it just the shared info page?
> >
> > > And I am kind of worried that moving it to the .data section won't
> > > be completly safe - as the decompressor might blow away that part too.
> >
> > The decompressor may just clear the area, but since there is no way to
> > tell where the shared pages are its always a risk to allocate them at
> > compile time.
>
> Yeah, and with the hypervisor potentially still updating the "old"
> MFN before the new kernel has registered the new MFN, we can end up
> corrupting the new kernel. Ouch.
>
> Would all of these issues disappear if the hypervisor had a hypercall
> that would stop updating the shared info? or just deregister the MFN?
> What if you ripped the GMFN out using 'decrease_reservation' hypercall?
> Would that eliminate the pesky GMFN?
I'm not sure, most likely the gfn will just disappear from the guest,
like a ballooned page disappears. Accessing it will likely cause a
crash.
Olaf
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Olaf Hering <olaf@aepfle.de>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Daniel Kiper <dkiper@net-space.pl>,
xen-devel@lists.xensource.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, Jan Beulich <JBeulich@suse.com>
Subject: Re: [Xen-devel] incorrect layout of globals from head_64.S during kexec boot
Date: Tue, 10 Jul 2012 20:09:53 +0200 [thread overview]
Message-ID: <20120710180953.GB20075@aepfle.de> (raw)
In-Reply-To: <20120710172626.GA6868@phenom.dumpdata.com>
On Tue, Jul 10, Konrad Rzeszutek Wilk wrote:
> On Tue, Jul 10, 2012 at 05:23:08PM +0200, Olaf Hering wrote:
> > I was not thinking of statically allocated pages but some new concept of
> > allocating such shared pages. Shouldnt there be some dedicated area in
> > the E820 table which has to be used during the whole life time of the
> > guest?
>
> Not that I can see. But I don't see why that could not be added? Perhaps
> the HVM loader can make it happen? But then how would it tell the kernel
> that this E820_RESERVED is the shared_info one. Not the other ones..
Maybe just use a new E820 type for this sort of thing? Its just the
question wether some other OS can cope with an unknown type. From my
reading of the e820 related code a region with an unknown type is just
ignored.
> > Are there more shared areas or is it just the shared info page?
> >
> > > And I am kind of worried that moving it to the .data section won't
> > > be completly safe - as the decompressor might blow away that part too.
> >
> > The decompressor may just clear the area, but since there is no way to
> > tell where the shared pages are its always a risk to allocate them at
> > compile time.
>
> Yeah, and with the hypervisor potentially still updating the "old"
> MFN before the new kernel has registered the new MFN, we can end up
> corrupting the new kernel. Ouch.
>
> Would all of these issues disappear if the hypervisor had a hypercall
> that would stop updating the shared info? or just deregister the MFN?
> What if you ripped the GMFN out using 'decrease_reservation' hypercall?
> Would that eliminate the pesky GMFN?
I'm not sure, most likely the gfn will just disappear from the guest,
like a ballooned page disappears. Accessing it will likely cause a
crash.
Olaf
next prev parent reply other threads:[~2012-07-10 18:10 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 21:06 incorrect layout of globals from head_64.S during kexec boot Olaf Hering
2012-07-05 21:06 ` Olaf Hering
2012-07-06 8:29 ` [Xen-devel] " Jan Beulich
2012-07-06 8:29 ` Jan Beulich
2012-07-06 8:29 ` Jan Beulich
2012-07-06 8:41 ` Daniel Kiper
2012-07-06 8:41 ` Daniel Kiper
2012-07-06 8:41 ` Daniel Kiper
2012-07-06 12:07 ` Olaf Hering
2012-07-06 12:07 ` Olaf Hering
2012-07-06 12:56 ` [Xen-devel] " Jan Beulich
2012-07-06 12:56 ` Jan Beulich
2012-07-06 12:56 ` Jan Beulich
2012-07-06 13:31 ` Olaf Hering
2012-07-06 13:31 ` Olaf Hering
2012-07-06 13:31 ` Olaf Hering
2012-07-06 13:53 ` Jan Beulich
2012-07-06 13:53 ` Jan Beulich
2012-07-06 13:53 ` Jan Beulich
2012-07-06 14:14 ` Olaf Hering
2012-07-06 14:14 ` Olaf Hering
2012-07-06 14:50 ` Jan Beulich
2012-07-06 14:50 ` Jan Beulich
2012-07-06 14:50 ` Jan Beulich
2012-07-06 17:29 ` Olaf Hering
2012-07-06 17:29 ` Olaf Hering
2012-07-10 9:33 ` Olaf Hering
2012-07-10 9:33 ` Olaf Hering
2012-07-10 14:14 ` Konrad Rzeszutek Wilk
2012-07-10 14:14 ` Konrad Rzeszutek Wilk
2012-07-10 14:46 ` Ian Campbell
2012-07-10 14:46 ` Ian Campbell
2012-07-10 14:51 ` Konrad Rzeszutek Wilk
2012-07-10 14:51 ` Konrad Rzeszutek Wilk
2012-07-10 14:51 ` Konrad Rzeszutek Wilk
2012-07-10 15:29 ` Ian Campbell
2012-07-10 15:29 ` Ian Campbell
2012-07-10 15:29 ` Ian Campbell
2012-07-10 15:37 ` Olaf Hering
2012-07-10 15:37 ` Olaf Hering
2012-07-10 15:23 ` Olaf Hering
2012-07-10 15:23 ` Olaf Hering
2012-07-10 17:26 ` Konrad Rzeszutek Wilk
2012-07-10 17:26 ` Konrad Rzeszutek Wilk
2012-07-10 17:26 ` Konrad Rzeszutek Wilk
2012-07-10 18:09 ` Olaf Hering [this message]
2012-07-10 18:09 ` Olaf Hering
2012-07-10 18:32 ` Konrad Rzeszutek Wilk
2012-07-10 18:32 ` Konrad Rzeszutek Wilk
2012-07-10 19:08 ` Keir Fraser
2012-07-10 19:08 ` Keir Fraser
2012-07-10 19:08 ` Keir Fraser
2012-07-13 20:20 ` Olaf Hering
2012-07-13 20:20 ` Olaf Hering
2012-07-14 4:54 ` Keir Fraser
2012-07-14 4:54 ` Keir Fraser
2012-07-14 4:54 ` Keir Fraser
2012-07-15 16:06 ` Olaf Hering
2012-07-15 16:06 ` Olaf Hering
2012-07-15 17:17 ` Keir Fraser
2012-07-15 17:17 ` Keir Fraser
2012-07-15 17:17 ` Keir Fraser
2012-07-16 15:46 ` Konrad Rzeszutek Wilk
2012-07-16 15:46 ` Konrad Rzeszutek Wilk
2012-07-17 10:24 ` Olaf Hering
2012-07-17 10:24 ` Olaf Hering
2012-07-17 12:34 ` Olaf Hering
2012-07-17 12:34 ` Olaf Hering
2012-07-06 15:54 ` Daniel Kiper
2012-07-06 15:54 ` Daniel Kiper
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=20120710180953.GB20075@aepfle.de \
--to=olaf@aepfle.de \
--cc=JBeulich@suse.com \
--cc=dkiper@net-space.pl \
--cc=kexec@lists.infradead.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/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 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.