[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.