From: Huang Ying <ying.huang@intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Don Zickus <dzickus@redhat.com>,
huang ying <huang.ying.caritas@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
Robert Richter <robert.richter@amd.com>,
Andi Kleen <ak@linux.intel.com>, Borislav Petkov <bp@alien8.de>
Subject: Re: [RFC] x86, NMI, Treat unknown NMI as hardware error
Date: Tue, 17 May 2011 15:41:06 +0800 [thread overview]
Message-ID: <4DD22692.7050209@intel.com> (raw)
In-Reply-To: <20110516112934.GE19837@elte.hu>
On 05/16/2011 07:29 PM, Ingo Molnar wrote:
>
> * Don Zickus <dzickus@redhat.com> wrote:
>
>> On Fri, May 13, 2011 at 05:20:33PM +0200, Ingo Molnar wrote:
>>>
>>> * huang ying <huang.ying.caritas@gmail.com> wrote:
>>>
>>>>> What should be done instead is to add an event for unknown NMIs, which can
>>>>> then be processed by the RAS daemon to implement policy.
>>>>>
>>>>> By using 'active' event filters it could even be set on a system to panic
>>>>> the box by default.
>>>>
>>>> If there is real fatal hardware error, maybe we have no luxury to go from NMI
>>>> handler to user space RAS daemon to determine what to do. System may explode,
>>>> bad data may go to disk before that.
>>>
>>> That is why i suggested:
>>>
>>> > > By using 'active' event filters it could even be set on a system to panic
>>> > > the box by default.
>>>
>>> event filters are evaluated in the kernel, so the panic could be instantaneous,
>>> without the event having to reach user-space.
>>
>> Interesting. Question though, what do you mean by 'event filtering'. Is
>> that different then setting 'unknown_nmi_panic' panic on the commandline or
>> procfs?
>>
>> Or are you suggesting something like registering another callback on the
>> die_chain that looks for DIE_NMIUNKNOWN as the event, swallows them and
>> implements the policy? That way only on HEST related platforms would
>> register them while others would keep the default of 'Dazed and confused'
>> messages?
>
> The idea is that "event filters", which are an existing upstream feature and
> which can be used in rather flexible ways:
>
> http://lkml.org/lkml/2011/4/27/660
>
> Could be used to trigger non-standard policy action as well - such as to panic
> the box.
>
> This would replace various very limited /debugfs and /sys event filtering hacks
> (and hardcoded policies) such as arch/x86/kernel/cpu/mcheck/mce-severity.c, and
> it would allow nonstandard behavior like 'panic the box on unknown NMIs' as
> well.
>
> This could be set by the RAS daemon, and it could be propagated to the kernel
> boot line as well, where event filter syntax would look like this:
>
> events=nmi::unknown"if (reason == 0) panic();"
>
> (Where the 'reason' field of the NMI event is the current legacy 'reason' value
> there.)
>
> The filter code would have to be modified to be able to recognize the panic()
> bit, but that's desirable anyway and it is a one-time effort.
>
> This:
>
> events=nmi::unknown:"if (reason == 0) ignore();"
>
> would be a possible outcome as well, on certain boxes - to skip certain events.
We can determine whether NMI is unknown in kernel now. If you want to
push all unknown NMI logic into user space (although I don't think that
is the best solution), is it not sufficient that just check system in
user space (via PCI ID or DMI ID, etc) and set existing
"unknown_nmi_panic" accordingly?
Best Regards,
Huang Ying
next prev parent reply other threads:[~2011-05-17 7:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 8:23 Huang Ying
2011-05-13 12:45 ` Don Zickus
2011-05-13 13:00 ` Ingo Molnar
2011-05-13 13:24 ` huang ying
2011-05-13 15:20 ` Ingo Molnar
2011-05-13 16:00 ` Don Zickus
2011-05-16 11:29 ` Ingo Molnar
2011-05-16 19:19 ` Don Zickus
2011-05-17 8:50 ` Ingo Molnar
2011-05-17 7:41 ` Huang Ying [this message]
2011-05-17 8:53 ` Ingo Molnar
2011-05-19 6:44 ` Huang Ying
2011-05-20 11:58 ` Ingo Molnar
2011-05-14 0:56 ` huang ying
2011-05-13 13:17 ` huang ying
2011-05-13 13:51 ` Don Zickus
2011-05-14 0:20 ` huang ying
2011-05-14 4:11 ` Andi Kleen
2011-05-13 15:17 ` Cyrill Gorcunov
2011-05-14 0:26 ` huang ying
2011-05-14 7:51 ` Cyrill Gorcunov
2011-05-15 0:06 ` huang ying
2011-05-15 6:34 ` Cyrill Gorcunov
2011-05-16 1:09 ` Huang Ying
2011-05-16 19:03 ` Don Zickus
2011-05-16 19:53 ` Cyrill Gorcunov
2011-05-17 5:39 ` Huang Ying
2011-05-17 14:24 ` Don Zickus
2011-05-17 16:38 ` Andi Kleen
2011-05-17 17:57 ` Don Zickus
2011-05-17 18:18 ` Andi Kleen
2011-05-17 19:07 ` Don Zickus
2011-05-20 8:13 ` Huang Ying
2011-06-09 12:09 ` Don Zickus
2011-06-09 15:22 ` Cyrill Gorcunov
2011-06-13 1:34 ` Huang Ying
2011-05-16 19:44 ` Cyrill Gorcunov
2011-05-17 7:32 ` Huang Ying
2011-05-14 0:47 ` huang ying
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=4DD22692.7050209@intel.com \
--to=ying.huang@intel.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=bp@alien8.de \
--cc=dzickus@redhat.com \
--cc=huang.ying.caritas@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.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
Powered by JetHome