From: Ingo Molnar <mingo@elte.hu>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Jin Dongming <jin.dongming@np.css.fujitsu.com>
Subject: Re: [PATCH -tip] x86, mce: CE in last bank prevents panic by unknown MCE
Date: Wed, 26 Aug 2009 11:14:07 +0200 [thread overview]
Message-ID: <20090826091407.GA7743@elte.hu> (raw)
In-Reply-To: <4A94E244.3020301@jp.fujitsu.com>
* Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> wrote:
> [based on tip/x86/mce]
>
> If MCE handler is called but none of mces_seen have machine check
> event which might signal the MCE (i.e. event higher than
> MCE_KEEP_SEVERITY), panic with "Machine check from unknown source"
> will be taken since the MCE is assumed to be signaled from
> external agent or so.
>
> Usually mces_seen never point MCE_KEEP_SEVERITY event such as CE.
> But it can happen because initial value of mces_seen is
> accidentally modified by mce_no_way_out() - in case if
> mce_no_way_out() run through all banks and the last bank has the
> CE, mces_seen points the CE and the "panic by unknown" will not be
> taken.
>
> This patch fix this undesired behavior, and clarify the logic.
>
> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> Reported-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
applied, thanks!
Btw., i had a quick look at
arch/x86/kernel/cpu/mcheck/mce-severity.c, and it is quite a pile of
unclean, over-engineered crap really.
Would you be interested in sending me a patch that converts that to
clean, proper C code that just checks the bits in a straightforward,
readable way? We dont need that silly, unreadable table with the
macro jungle and we definitely dont want to expose it via debugfs -
the debugfs bits can be removed altogether.
[ Plus in the mce_severity() implementation please rename 'a' to at
least 'm' - that name choice for a variable shows zero taste. We
dont program the kernel in BASIC with 'A', 'B' and 'C' variable
names anymore. ]
Thanks,
Ingo
next prev parent reply other threads:[~2009-08-26 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 7:20 [PATCH -tip] x86, mce: CE in last bank prevents panic by unknown MCE Hidetoshi Seto
2009-08-26 9:14 ` Ingo Molnar [this message]
2009-09-17 21:37 ` [tip:x86/pat] " tip-bot for Hidetoshi Seto
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=20090826091407.GA7743@elte.hu \
--to=mingo@elte.hu \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jin.dongming@np.css.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seto.hidetoshi@jp.fujitsu.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