WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86, ept: remove execute permission for g

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86, ept: remove execute permission for granted pages' P2M entries
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Aug 2009 03:00:18 -0700
Delivery-date: Mon, 31 Aug 2009 03:00:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251708705 -3600
# Node ID af2fbc4d5311d46d5c830ed8168a43764df08630
# Parent  bff9f3e5ad940845a02702558129e5db815f1fd5
x86, ept: remove execute permission for granted pages' P2M entries

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 <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/mm/hap/p2m-ept.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r bff9f3e5ad94 -r af2fbc4d5311 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Mon Aug 31 09:51:05 2009 +0100
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Mon Aug 31 09:51:45 2009 +0100
@@ -40,14 +40,20 @@ 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 = entry->w = entry->x = 1;
             return;
         case p2m_ram_logdirty:
         case p2m_ram_ro:
-        case p2m_grant_map_ro:
             entry->r = entry->x = 1;
             entry->w = 0;
+            return;
+        case p2m_grant_map_rw:
+            entry->r = entry->w = 1;
+            entry->x = 0;
+            return;
+        case p2m_grant_map_ro:
+            entry->r = 1;
+            entry->w = entry->x = 0;
             return;
     }
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86, ept: remove execute permission for granted pages' P2M entries, Xen patchbot-unstable <=