From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/2] xen/privcmd: add PRIVCMD_MMAPBATCH_V2 ioctl Date: Thu, 6 Sep 2012 12:20:20 -0400 Message-ID: <20120906162020.GA13327@localhost.localdomain> References: <1346331492-15027-1-git-send-email-david.vrabel@citrix.com> <1346331492-15027-3-git-send-email-david.vrabel@citrix.com> <20120905162148.GC11949@phenom.dumpdata.com> <939BE993-572C-4D83-8F04-E6B9D6EE3E92@gridcentric.ca> <20120905174046.GA25535@phenom.dumpdata.com> <39CBBAD7-E10F-457F-BFE3-717A50D059FB@gridcentric.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <39CBBAD7-E10F-457F-BFE3-717A50D059FB@gridcentric.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andres Lagar-Cavilla Cc: David Vrabel , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Sep 06, 2012 at 09:41:44AM -0400, Andres Lagar-Cavilla wrote: > On Sep 5, 2012, at 1:40 PM, Konrad Rzeszutek Wilk wrote: > > > On Wed, Sep 05, 2012 at 01:09:32PM -0400, Andres Lagar-Cavilla wrote: > >> Super. To which branch are you applying these now? (n00b question but have to ask) > > > > They will show up on stable/for-linus-3.7 once the overnight tests pass. > > I would be very surprised if this passed your nighties. This is because the following hunk is necessary: It did :-) I guess the Xen 4.1 isn't using this that much. > > diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c > index 5386f20..e4dfa3b 100644 > --- a/drivers/xen/privcmd.c > +++ b/drivers/xen/privcmd.c > @@ -389,7 +389,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version) > state.err = err_array; > ret = traverse_pages(m.num, sizeof(xen_pfn_t), > &pagelist, mmap_return_errors_v1, &state); > - } else > + } else if (version == 2) > ret = __copy_to_user(m.err, err_array, m.num * sizeof(int)); > > /* If we have not had any EFAULT-like global errors then set the global > > I can either resubmit the original patch with this squashed in, or send this stand-alone. Nightlies may have passed if your libxc never exercises v1 in favor of v2. But this is broken for v1 as it will unconditionally attempt a copy to user on a NULL target and this set rc to EFAULT. > Send it stand alone pls.