[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weirdo panic
From: |
Roland McGrath |
Subject: |
Re: weirdo panic |
Date: |
Sun, 31 Oct 2004 16:24:52 -0500 (EST) |
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);
- weirdo panic, Alfred M. Szmidt, 2004/10/31
- Re: weirdo panic,
Roland McGrath <=