From: "Jan Beulich" Subject: [PATCH] ept: remove execute permission for granted pages' P2M entries Date: Fri, 28 Aug 2009 09:18:58 +0100 Message-ID: <4A97AF1202000078000120D5@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org When backporting c/s 20026 I noticed that granted pages get execute permission, which doesn't seem desirable (and has been avoided for PV guests for quite a while). Even for p2m_mmio_direct is seems suspicious to allow execution, but me being less certain here I left it as is for the time being. Signed-off-by: Jan Beulich --- 2009-08-18.orig/xen/arch/x86/mm/hap/p2m-ept.c 2009-08-07 = 09:20:56.000000000 +0200 +++ 2009-08-18/xen/arch/x86/mm/hap/p2m-ept.c 2009-08-24 10:19:52.0000000= 00 +0200 @@ -40,15 +40,21 @@ static void ept_p2m_type_to_flags(ept_en return; case p2m_ram_rw: case p2m_mmio_direct: - case p2m_grant_map_rw: entry->r =3D entry->w =3D entry->x =3D 1; return; case p2m_ram_logdirty: case p2m_ram_ro: - case p2m_grant_map_ro: entry->r =3D entry->x =3D 1; entry->w =3D 0; return; + case p2m_grant_map_rw: + entry->r =3D entry->w =3D 1; + entry->x =3D 0; + return; + case p2m_grant_map_ro: + entry->r =3D 1; + entry->w =3D entry->x =3D 0; + return; } } =20