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] [linux-2.6.18-xen] x86-64: extend numeric user mode sele

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] x86-64: extend numeric user mode selector checks
From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
Date: Wed, 05 Oct 2011 13:55:03 +0100
Delivery-date: Wed, 05 Oct 2011 05:55:19 -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 Jan Beulich <jbeulich@xxxxxxxx>
# Date 1317818576 -7200
# Node ID 4dd3a1d5b26796c1c10c5c2a0026832675aa615d
# Parent  ed78d9bac40d465100d5dfb9998df6b633a53057
x86-64: extend numeric user mode selector checks

... to also cover Xen provided ones

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


diff -r ed78d9bac40d -r 4dd3a1d5b267 arch/x86_64/mm/fault-xen.c
--- a/arch/x86_64/mm/fault-xen.c        Wed Oct 05 14:39:04 2011 +0200
+++ b/arch/x86_64/mm/fault-xen.c        Wed Oct 05 14:42:56 2011 +0200
@@ -146,7 +146,8 @@
                        /* 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 @@
                   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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] x86-64: extend numeric user mode selector checks, Xen patchbot-linux-2 . 6 . 18-xen <=