Messages in this thread Patch in this message | | | Date | Mon, 17 Nov 2003 16:46:22 -0500 (EST) | From | Zwane Mwaikambo <> | Subject | Re: [PATCH][2.6-mm] Fix 4G/4G X11/vm86 oops |
| |
On Sat, 15 Nov 2003, Zwane Mwaikambo wrote:
> The 4G/4G page fault handling path doesn't appear to handle faults > happening whilst in vm86. The regs->xcs != __USER_CS so it confused the in > kernel test. > > However i'm still debugging the X11 triple fault in test9-mm3
I've managed to `fix` the triple fault (see further below for the patch in all it's glory). Unfortunately i have been unable to come up with a simpler workaround which is fewer instructions and easier to debug. I have tried the following;
mb()/barrier() flush_tlb_all() wbinvd() outb(0x80,0x00) local_irq_save(flags); local_irq_enable(); loop(); local_irq_restore(flags); long_loop()
What i do know is that in the following code;
__asm__ __volatile__( "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t" "movl %0,%%esp\n\t" "movl %1,%%ebp\n\t" "jmp resume_userspace" : /* no outputs */ :"r" (&info->regs), "r" (tsk->thread_info) : "ax");
It does get to resume_userspace as putting a $0 into %ebp will oops in __switch_to
And here is the current 'workaround'. Any hints?
Index: arch/i386/kernel/vm86.c =================================================================== RCS file: /build/cvsroot/linux-2.6.0-test9-mm3/arch/i386/kernel/vm86.c,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 vm86.c --- arch/i386/kernel/vm86.c 13 Nov 2003 08:07:17 -0000 1.1.1.1 +++ arch/i386/kernel/vm86.c 17 Nov 2003 21:45:13 -0000 @@ -312,6 +311,8 @@ static void do_sys_vm86(struct kernel_vm tsk->thread.screen_bitmap = info->screen_bitmap; if (info->flags & VM86_SCREEN_BITMAP) mark_screen_rdonly(tsk); + + printk("ooh la la\n"); __asm__ __volatile__( "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t" "movl %0,%%esp\n\t" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |