public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: root@chaos.analogic.com
Cc: richardj_moore@uk.ibm.com, Brian Gerst <bgerst@didntduck.org>,
	Andi Kleen <ak@suse.de>,
	"Maciej W. Rozycki" <macro@ds2.pg.gda.pl>,
	linux-kernel@vger.kernel.org
Subject: Re: Why is double_fault serviced by a trap gate?
Date: Sat, 09 Dec 2000 09:34:49 +1100	[thread overview]
Message-ID: <5114.976314889@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Fri, 08 Dec 2000 07:58:06 CDT." <Pine.LNX.3.95.1001208075103.10812A-100000@chaos.analogic.com>

On Fri, 8 Dec 2000 07:58:06 -0500 (EST), 
"Richard B. Johnson" <root@chaos.analogic.com> wrote:
>Too many people just want to argue without even reading what they
>are arguing against. Again, I implied nothing. I said;
>
> (1) User traps, CPL3, stack for trap is in CPL0.
> (2) CPL0 has stack-fault (bad ring zero code, bad memory).
> (3) CPL0 traps, using faulted stack, double fault.
> (4) There is no stack-trick, including a call-gate  to another
>  "environment" (complete with its previously-reserved stack),
>  that will ever get you back to (2), much less to (1).

Nobody thinks that a stack overflow is recoverable - for that process.
By the time you overflow, the struct task at the bottom of the kernel
stack has been overwritten so the process is dead, gone to make its
maker, it is pushing up daisies.  The rest of the system may or may not
recover, depending on the resources that the dead process is still
holding and the links between processes.

Changing the stack overflow to a trap gate will give us diagnostics on
the failing task instead of an immediate triple fault and reboot.
Diagnostics are useful.  If the system can recover afterwards then that
is a bonus but it is not guaranteed.  The process is always unrecoverable.

I am not convinced that using a trap gate for NMI is a good idea, the
NMI watchdog kicks in too often for my liking.  Using a trap gate for a
debugger would be worthwhile, I have always been worried about the
amount of stack that kdb uses.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-08 23:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-08  8:37 Why is double_fault serviced by a trap gate? richardj_moore
2000-12-08 12:58 ` Richard B. Johnson
2000-12-08 22:34   ` Keith Owens [this message]
2000-12-08 20:31 ` Mikulas Patocka
  -- strict thread matches above, loose matches on Subject: below --
2000-12-09 23:46 richardj_moore
2000-12-08 20:48 richardj_moore
2000-12-08 16:34 richardj_moore
2000-12-08 16:52 ` Richard B. Johnson
2000-12-08 13:18 richardj_moore
2000-12-07 23:08 richardj_moore
2000-12-07 23:03 richardj_moore
2000-12-07 23:01 Petr Vandrovec
2000-12-07 21:09 richardj_moore
2000-12-07 21:44 ` Richard B. Johnson
2000-12-07 22:36   ` Brian Gerst
2000-12-08  1:36     ` Richard B. Johnson
2000-12-08 11:44       ` Maciej W. Rozycki
2000-12-07 22:47 ` Keith Owens
2000-12-08 11:30 ` Maciej W. Rozycki
2000-12-07 20:20 Petr Vandrovec
2000-12-07 19:38 ` Maciej W. Rozycki
2000-12-07 18:13 Petr Vandrovec
2000-12-07 18:04 ` Maciej W. Rozycki
2000-12-07 16:04 richardj_moore
2000-12-07 16:13 ` Andi Kleen
2000-12-07 16:31   ` Richard B. Johnson
2000-12-07 16:55   ` Maciej W. Rozycki
2000-12-07 18:05     ` Andi Kleen
2000-12-07 18:11       ` Maciej W. Rozycki
2000-12-07 18:29         ` Andi Kleen
2000-12-07 18:47           ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5114.976314889@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=ak@suse.de \
    --cc=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@ds2.pg.gda.pl \
    --cc=richardj_moore@uk.ibm.com \
    --cc=root@chaos.analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox