bitkeeper revision 1.1159.223.75 (42078dd8VBcyJ0X9yF-bRHcBVUJ3Ww)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 7 Feb 2005 15:48:40 +0000 (15:48 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 7 Feb 2005 15:48:40 +0000 (15:48 +0000)
As pointed out on the xen-devel list, the vm86 call was not very robust in
Xen.
It turned out to be due to a missing check in the pagefault handler,
determining whether the pagefault came from userspace or from the kernel.
Now the syscall-crash tool doesn't cause any "Oops" on the vm86 calls anymore.

From: Stephan Diestelhorst <sd386@cam.ac.uk>
Signed-off-by: ian.pratt@cl.cam.ac.uk
linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c

index b869fad317ce2ff57082266a312acf886f5d69cf..9b5ba2b3d710e229a7e620d7688b58e0ee8f4e41 100644 (file)
@@ -228,7 +228,9 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code,
        /* Set the "privileged fault" bit to something sane. */
        error_code &= 3;
        error_code |= (regs->xcs & 2) << 1;
-
+       if (regs->eflags & X86_EFLAGS_VM)
+               error_code |= 4;
+               
        if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
                                        SIGSEGV) == NOTIFY_STOP)
                return;