From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: VMX status report. Xen:26323 & Dom0:3.7.1 Date: Thu, 10 Jan 2013 19:23:18 +0000 Message-ID: <50EF1526.50306@citrix.com> References: <1B4B44D9196EFF41AE41FDA404FC0A1024486E@SHSMSX101.ccr.corp.intel.com> <50EE908602000078000B44CE@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50EE908602000078000B44CE@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Yongjie Ren , Konrad Rzeszutek Wilk , xen-devel , Chao Zhou , Yan Dai , YongweiX Xu , SongtaoX Liu , Andres Lagar-Cavilla List-Id: xen-devel@lists.xenproject.org On 10/01/13 08:57, Jan Beulich wrote: >>>> On 10.01.13 at 08:51, "Ren, Yongjie" 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