All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Yongjie Ren <yongjie.ren@intel.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	xen-devel <xen-devel@lists.xen.org>,
	Chao Zhou <chao.zhou@intel.com>, Yan Dai <yan.dai@intel.com>,
	YongweiX Xu <yongweix.xu@intel.com>,
	SongtaoX Liu <songtaox.liu@intel.com>,
	Andres Lagar-Cavilla <andres@lagarcavilla.org>
Subject: Re: VMX status report. Xen:26323 & Dom0:3.7.1
Date: Thu, 10 Jan 2013 19:23:18 +0000	[thread overview]
Message-ID: <50EF1526.50306@citrix.com> (raw)
In-Reply-To: <50EE908602000078000B44CE@nat28.tlf.novell.com>

On 10/01/13 08:57, Jan Beulich wrote:
>>>> On 10.01.13 at 08:51, "Ren, Yongjie" <yongjie.ren@intel.com> wrote:
>> New issue(1)
>> ==============
>> 1. sometimes live migration failed and reported call trace in dom0
>>   http://bugzilla.xen.org/bugzilla/show_bug.cgi?id=1841 
> 
> For the failed allocation, the only obvious candidate appears to be
> 
> 	err_array = kcalloc(m.num, sizeof(int), GFP_KERNEL);
> 
> which quite obviously can be of (almost) arbitrary size because
> 
> 	nr_pages = m.num;
> 	if ((m.num <= 0) || (nr_pages > (LONG_MAX >> PAGE_SHIFT)))
> 		return -EINVAL;
> 
> really only checks for completely insane values.
> 
> This got introduced by Andres' "xen/privcmd: add PRIVCMD_MMAPBATCH_V2
> ioctl" and is becoming worse with Mukesh's recent "xen: privcmd:
> support autotranslated physmap guests", which added another
> similar (twice as large) allocation in alloc_empty_pages().
> 
> I'd like to note that the forward ported kernels don't appear to
> have a similar issue, as they never allocates more than a page at
> a time. Was that code consulted at all when that addition was
> done?

I did highlight this at the time[1].

See [2] for how I avoided this allocation.

David

[1] http://lists.xen.org/archives/html/xen-devel/2012-08/msg02208.html
[2] http://lists.xen.org/archives/html/xen-devel/2012-08/msg02092.html

  parent reply	other threads:[~2013-01-10 19:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10  7:51 VMX status report. Xen:26323 & Dom0:3.7.1 Ren, Yongjie
2013-01-10  8:57 ` Jan Beulich
2013-01-10 17:10   ` Andres Lagar-Cavilla
2013-01-10 17:27     ` Mats Petersson
2013-01-11  8:34     ` Jan Beulich
2013-01-11 16:05       ` Andres Lagar-Cavilla
2013-01-14  4:29       ` Andres Lagar-Cavilla
2013-01-14  5:03         ` Andres Lagar-Cavilla
2013-01-14 13:59         ` David Vrabel
2013-01-14 15:06           ` Andres Lagar-Cavilla
2013-01-14 16:03             ` David Vrabel
2013-01-14 16:14               ` Jan Beulich
2013-01-14 16:15                 ` David Vrabel
2013-01-14 16:19                   ` Andres Lagar-Cavilla
2013-01-14 21:21                     ` Konrad Rzeszutek Wilk
2013-01-14 16:18               ` Andres Lagar-Cavilla
2013-01-10 19:23   ` David Vrabel [this message]
2013-01-11 15:55     ` Andres Lagar-Cavilla

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=50EF1526.50306@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andres@lagarcavilla.org \
    --cc=chao.zhou@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=songtaox.liu@intel.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yan.dai@intel.com \
    --cc=yongjie.ren@intel.com \
    --cc=yongweix.xu@intel.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.