From: Wei Liu Subject: Re: [PATCH for-4.6] xen/mm: populate_physmap: validate correctly the gfn for direct mapped domain Date: Wed, 12 Aug 2015 10:28:24 +0100 Message-ID: <20150812092824.GX7460@zion.uk.xensource.com> References: <1439314888-24813-1-git-send-email-julien.grall@citrix.com> <20150812091904.GW7460@zion.uk.xensource.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 1ZPSKi-0006y3-9V for xen-devel@lists.xenproject.org; Wed, 12 Aug 2015 09:28:28 +0000 Content-Disposition: inline In-Reply-To: <20150812091904.GW7460@zion.uk.xensource.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, Tim Deegan , Ian Jackson , stefano.stabellini@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org On Wed, Aug 12, 2015 at 10:19:04AM +0100, Wei Liu wrote: > On Tue, Aug 11, 2015 at 06:41:28PM +0100, Julien Grall wrote: > > Direct mapped domain has already the memory allocated 1:1, so we are > > directly using the gfn as mfn to map the RAM in the guest. > > > > While we are validating that the page associated to the first mfn belongs to > > the domain, the subsequent MFN are not validated when the extent_order > > is > 0. > > > > This may result to map memory region (MMIO, RAM) which doesn't belong to the > > domain. > > > > Although, only DOM0 on ARM is using a direct memory mapped. So it > > doesn't affect any guest (at least on the upstream version) or even x86. > > > > Signed-off-by: Julien Grall > > > > --- > > Cc: Ian Campbell > > Cc: Ian Jackson > > Cc: Jan Beulich > > Cc: Keir Fraser > > Cc: Tim Deegan > > > > This patch is a candidate for Xen 4.6 and backport to Xen 4.5 (and > > maybe 4.4). > > > > Fine by me in principle for this patch to go in 4.6. I shall do this in a formal way. Release-acked-by: Wei Liu