Try this on for size.  Hopefully this will result in some user program
crashing rather than a kernel panic when whatever problem you hit happens.

--- gnumach/i386/i386/trap.c.~1.5.~     2002-05-27 16:02:30.000000000 -0700
+++ gnumach/i386/i386/trap.c    2004-10-31 13:23:44.246363356 -0800
@@ -503,12 +503,12 @@ printf("user trap %d error %d sub %08x\n
 
            case T_GENERAL_PROTECTION:
                if (!(regs->efl & EFL_VM)) {
-                       if (check_io_fault(regs))
+                       if (regs->cs == USER_CS && check_io_fault(regs))
                                return 0;
                }
                /* Check for an emulated int80 system call.
                   NetBSD-current and Linux use trap instead of call gate. */
-               if (thread->task->eml_dispatch) {
+               if (thread->task->eml_dispatch && regs->cs == USER_CS) {
                        unsigned char opcode, intno;
 
                        opcode = inst_fetch(regs->eip, regs->cs);


_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to