[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:

> > 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.

A task gate is an absolute must for the double fault if we want to have a
working handler. Intel warns the CPU state can be inconsistent when a
double fault happens and for example I've seen cases where the saved CS
and EIP were not matching each other (tests were not conducted under
Linux). Also SS:ESP might be unusable leading to a triple fault.

The NMI should be left alone, though, I think as we want it to be fast
for the NMI watchdog. Task gates are not necessarily fast (depending on
how you define "fast").

+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+ e-mail:, PGP key available +

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.052 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site