From: "Jan Beulich" <jbeulich@novell.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Joerg Roedel" <joro@8bytes.org>,
"Andi Kleen" <andi@firstfloor.org>, <tglx@linutronix.de>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
<linux-kernel@vger.kernel.org>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] i386: improve double fault handling
Date: Mon, 28 Jul 2008 14:59:21 +0100 [thread overview]
Message-ID: <488DECD9.76E4.0078.0@novell.com> (raw)
In-Reply-To: <20080728134252.GI5515@elte.hu>
>Also, you seem to be setting things up to turn NMIs and MCEs into task
>gates too, right?
Yes, at the very minimum I'd like to have the possibility to do so. Perhaps
under a default-off config option.
>So i'm really uneasy about all this. Breakage in such rarely used code
>gets found very late, and has thus a high risk of losing debug
>information when we need it the most. (i.e. it works in the exact
>_opposite_ way of the intented goal of making things more robust - it
>makes things less robust)
I realize this aspect, but think that either way has its advantages and
disadvantages.
>Firstly, 64-bit does not use a task gate for double faults anymore. (but
>uses a separate IST stack for double faults)
Sure - because there are no task gates on 64-bit.
>Secondly, task gates are really a relic that should not be proliferated.
>Besides the complications in virtualized environments (if more common
>things like Big Real Mode are not supported well in virtual mode what do
>we expect of more esoteric features as task gates?) it does not get
>nearly as much testing on real silicon as other, more mainstream CPU
>features.
>
>Thirdly, NMI based profiling is quite common, so by turning NMIs into
>task gates we'd slow that down quite a lot.
As said above, I'd like to allow the option of doing so. Profiling via
NMI certainly will not want this. I'm really uncertain whether modern
machines can report any hardware issue through NMI (no chipset spec
I read 'recently' [covering quite a number of years] was really explicit
about this) - if it can't, MCE would be the only candidate unless
running on really old hardware.
>Also, the change to doublefault_fn is quite ugly - that inner block
>should be split out into a separate function.
That's certainly doable - if the whole thing is acceptable apart from
that issue, which it doesn't seem it is...
>Plus the notifier - why do we care about that? It's not like we can
In order to let a kernel debugger take control.
>sanely kexec into a safe kernel from double faulting kernels in most
>cases. In real cases where i've seen double faults it was due to us
>corrupting kernel pagetables - kexec has no chance there. To recover
>from that we'd have to set up the TSS with a safe(r) cr3 as well - but
>your patch leaves _that_ untouched. (nor do we want to waste extra
>unswappable memory on such remote possibilities i think)
I've seen double faults due to other than page table corruption, but
I do understand if it is the page tables that caused it handling the
condition is almost impossible without a second complete set of (kernel)
page tables.
Jan
next prev parent reply other threads:[~2008-07-28 13:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 12:30 [PATCH] i386: improve double fault handling Jan Beulich
2008-07-18 23:24 ` H. Peter Anvin
2008-07-21 8:54 ` Jan Beulich
2008-07-21 11:05 ` Ingo Molnar
2008-07-22 10:13 ` Jan Beulich
2008-07-28 13:42 ` Ingo Molnar
2008-07-28 13:45 ` H. Peter Anvin
2008-07-28 13:59 ` Jan Beulich [this message]
2008-07-28 14:02 ` H. Peter Anvin
2008-07-28 16:28 ` Ingo Molnar
2008-07-28 22:00 ` Chuck Ebbert
2008-07-31 10:46 ` Ingo Molnar
2008-07-23 21:43 ` Joerg Roedel
2008-07-24 7:08 ` Jan Beulich
2008-07-24 13:24 ` H. Peter Anvin
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=488DECD9.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.