All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxc: x86: ensure that the initial mapping fits into the guest's memory
Date: Mon, 7 Jan 2013 10:37:36 +0000	[thread overview]
Message-ID: <1357555056.14291.142.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <50EAB2F402000078000B352B@nat28.tlf.novell.com>

On Mon, 2013-01-07 at 10:35 +0000, Jan Beulich wrote:
> >>> On 07.01.13 at 08:00, Jan Beulich wrote:
> >>>> Ian Campbell <Ian.Campbell@citrix.com> 01/04/13 5:53 PM >>>
> >>libxc: x86: ensure that the initial mapping fits into the guest's memory
> >>
> >>In particular we need to check that adding 512KB of slack and
> >>rounding up to a 4MB boundary do not overflow the guest's memory
> >>allocation. Otherwise we run off the end of the p2m when building the
> >>guest's initial page tables and populate them with garbage.
> > 
> > Sadly our testing found this to cause SLE11 SP2 PV guests to not start
> > anymore (in its 4.1.x backported incarnation). I didn't get around yet to
> > check whether in the (apparently trivial) backport I overlooked something;
> > will do as soon as I get to the office.
> 
> Switching the added panic invocation to
> 
>             xc_dom_panic(dom->xch, XC_OUT_OF_MEMORY,
>                          "%s: not enough memory for initial mapping (%#"PRIx64" > %#"PRIpfn")",
>                          __FUNCTION__, try_virt_end >> PAGE_SHIFT_X86,
>                          dom->total_pages);
> 
> I see (with xend on 4.1.3)
> 
> xc: error: panic: xc_dom_x86.c:100: count_pgtables: not enough memory for initial mapping (0xffffffff81bff > 0x80000): Out of memory
> 
> Did this really work for you?

It did but I must confess I only tested with the mini-os test domain,
since that was what the initial bug was reported about and I stupidly
didn't think to test with a "real" kernel.

>  The 4.1.3 xl doesn't really want to work
> for me, so I can't directly cross check whether there's a behavioral
> difference between the two, but looking at an older log the virtual
> addresses reported for virt_alloc_end look similar. Afaict you need
> to subtract dom->parms.virt_base from try_virt_end.

I bet virt_base == 0 for the mini-os kernel I tried. I'll respin and
retest.

Thanks and sorry for the cockup,

Ian.

  reply	other threads:[~2013-01-07 10:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Tr9he-0007fM-NC@xenbits.xen.org>
2013-01-04 16:52 ` [PATCH] libxc: x86: ensure that the initial mapping fits into the guest's memory Ian Campbell
2013-01-07  7:00   ` Jan Beulich
2013-01-07 10:35   ` Jan Beulich
2013-01-07 10:37     ` Ian Campbell [this message]
2013-01-07 11:05       ` Jan Beulich
2013-01-07 11:39         ` Ian Campbell
2013-01-07 13:37           ` [PATCH V2] " Ian Campbell
2013-01-07 10:21 ` Security support for debug=y builds (Was Re: Xen Security Advisory 37 (CVE-2013-0154) - Hypervisor crash due to incorrect ASSERT (debug build only)) Ian Campbell
2013-01-07 11:08   ` Keir Fraser
2013-01-07 11:21     ` Andrew Cooper
2013-01-07 11:36       ` Ian Campbell
2013-01-07 12:58         ` James Bulpin
2013-01-07 16:22           ` Keir Fraser
2013-02-08 11:25         ` Ian Campbell
2013-02-08 11:29           ` Ian Campbell
2013-02-08 11:29         ` Ian Campbell
2013-02-08 11:40           ` Jan Beulich
2013-02-08 11:47             ` Ian Campbell
2013-01-07 11:09   ` Jan Beulich

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=1357555056.14291.142.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 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.