From: Wei Liu Subject: Re: [PATCH for-4.6] tools/libxc: linux: Don't use getpagesize() when unmapping the grants Date: Fri, 7 Aug 2015 22:45:09 +0100 Message-ID: <20150807214509.GA10919@zion.uk.xensource.com> References: <1438973635-16517-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZNpRz-0004l4-Gl for xen-devel@lists.xenproject.org; Fri, 07 Aug 2015 21:45:15 +0000 Content-Disposition: inline In-Reply-To: <1438973635-16517-1-git-send-email-julien.grall@citrix.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: Julien Grall Cc: Wei.Liu2@citrix.com, ian.campbell@citrix.com, Stefano Stabellini , Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Fri, Aug 07, 2015 at 07:53:55PM +0100, Julien Grall wrote: > The grants are based on the Xen granularity (i.e 4KB). While the function > to map grants for Linux (linux_gnttab_grant_map) is using the correct > size (XC_PAGE_SIZE), the unmap one (linux_gnttab_munmap) is using > getpagesize(). > > On domain using a page granularity different than Xen (this is the case > for AARCH64 guest using 64KB page), the unmap will be called with the > wrong size. > > Signed-off-by: Julien Grall > > --- > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Ian Campbell > Cc: Wei Liu > Acked-by: Wei Liu I think this is a bug fix and should be applied for 4.6.