From: "Jan Beulich" Subject: Re: [PATCH v7 10/10] xen/common: do not implicitly permit access to mapped I/O memory Date: Mon, 26 May 2014 16:00:11 +0100 Message-ID: <5383731B0200007800015CF7@mail.emea.novell.com> References: <1399305254-3695-1-git-send-email-avanzini.arianna@gmail.com> <1399305254-3695-11-git-send-email-avanzini.arianna@gmail.com> <5368C22B020000780000F3C9@mail.emea.novell.com> <53822511.1040604@linaro.org> <53831F6502000078000159F6@mail.emea.novell.com> <538330420200007800015B2B@mail.emea.novell.com> <53831D36.9070605@linaro.org> <53833E190200007800015BE0@mail.emea.novell.com> <5383247A.60900@linaro.org> <5383439C0200007800015C21@mail.emea.novell.com> <538328B0.30404@linaro.org> <538346EE0200007800015C49@mail.emea.novell.com> <53833075.7020200@linaro.org> <53835C4D0200007800015CB9@mail.emea.novell.com> <53834F2D.3020908@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53834F2D.3020908@linaro.org> Content-Disposition: inline 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: Ian.Campbell@eu.citrix.com, paolo.valente@unimore.it, keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, julien.grall@citrix.com, etrudeau@broadcom.com, tim@xen.org, Arianna Avanzini , viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org >>> On 26.05.14 at 16:26, wrote: > I'm still not convince, it's perfectly valid to: > 1) call iomem_permission to set the permission > 2) call memory_mapping > 3) call iomem_permission to remove the permission > > In this case the memory mapping will be there without any granting. > Hence, we won't be able to remove those mappings. This would be a tool stack bug imo. And yes, this is possible, but no, I don't think one should rely on this being possible (i.e. if we introduced ways to find such mappings and refused the permission removal, nothing should break). Jan