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-devel

[Xen-devel] [PATCH] linux-2.6.18/x86-64: extend numeric user mode select

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux-2.6.18/x86-64: extend numeric user mode selector checks
From: "Jan Beulich" <JBeulich@xxxxxxxx>
Date: Tue, 04 Oct 2011 11:30:23 +0100
Delivery-date: Tue, 04 Oct 2011 03:31:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
... to also cover Xen provided ones

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/arch/x86_64/mm/fault-xen.c
+++ b/arch/x86_64/mm/fault-xen.c
@@ -146,7 +146,8 @@ static noinline int is_prefetch(struct p
                        /* Could check the LDT for lm, but for now it's good
                           enough to assume that long mode only uses well known
                           segments or kernel. */
-                       scan_more = (!user_mode(regs)) || (regs->cs == 
__USER_CS);
+                       scan_more = (!user_mode(regs)) || (regs->cs == 
__USER_CS)
+                                   || (regs->cs == FLAT_USER_CS64);
                        break;
                        
                case 0x60:
@@ -575,8 +576,8 @@ bad_area_nosemaphore:
                   these addresses are not reachable. Just detect this
                   case and return.  Any code segment in LDT is
                   compatibility mode. */
-               if ((regs->cs == __USER32_CS || (regs->cs & (1<<2))) &&
-                   (address >> 32))
+               if ((regs->cs == __USER32_CS || regs->cs == FLAT_USER_CS32 ||
+                    (regs->cs & (1<<2))) && (address >> 32))
                        return;
 
                if (exception_trace && unhandled_signal(tsk, SIGSEGV)) {




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux-2.6.18/x86-64: extend numeric user mode selector checks, Jan Beulich <=