[lkml]   [2000]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Why is double_fault serviced by a trap gate?
On Thu, 7 Dec 2000, Andi Kleen wrote:

> On Thu, Dec 07, 2000 at 04:04:21PM +0000, wrote:
> >
> >
> > Why is double_fault serviced by a trap gate? The problem with this is that
> > any double-fault caused by a stack-fault, which is the usual reason,
> > becomes a triple-fault. And a triple-fault results in a processor reset or
> > shutdown making the fault damn near impossible to get any information on.
> >
> > Oughtn't the double-fault exception handler be serviced by a task gate? And
> > similarly the NMI handler in case the NMI is on the current stack page
> > frame?
> Sounds like a good idea, when you can afford a few K for a special
> NMI/double fault stack. On x86-64 it is planned to do that.

Well, at least on current ix86 processors it can't. Attempting to
use a task gate appears to be a trick to cause the exception to
be handled on the current stack. The hardware protection hierarchy
won't let this happen. You need to have a stack that is not accessible
from the mode that will be trapped. Otherwise, a user could crash
the machine by setting ESP to 0 and waiting for the next context-
switch or timer-tick.

Dick Johnson

Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:51    [W:0.044 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site