[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5cf492bf-9807-a091-6ac2-a953fce276da@huawei.com>
Date: Sat, 3 Dec 2022 10:19:32 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: "Luck, Tony" <tony.luck@...el.com>
CC: "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bp@...en8.de" <bp@...en8.de>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] mce: fix missing stack-dumping in mce_panic()
On 2022/12/2 22:44, Luck, Tony wrote:
>> When machine check exception occurs, there is no stack-dumping now in
>> mce_panic(). It's because bust_spinlocks(1) is called prematurely so
>> oops_in_progress will be >= 2 when trying to call dump_stack() in
>> panic(). Thus dump_stack() won't be called as this is considered as
>> nested stack-dumping.
>
Many thanks for your quick reply. :)
> I had an earlier patch series to just dump from "interesting" machine checks
> (I think the interesting ones are when the kernel hit poison in code that hadn't
> been tagged in the extable as recoverable)
>
> https://lore.kernel.org/all/20220922195136.54575-1-tony.luck@intel.com/
[1]
>
> Discussion on that fizzled out.
>
> Thanks for tracking down why panic() didn't provide a stack dump.
>
> I'm still of the opinion that stack dumps from machine checks aren't
> generally useful. But I'd rather have extra stack dumps than no stack
> dumps at all.
As you mentioned in [1]:
"""
In order to ease the hunt for additional code flows where machine check
errors can be recovered it is useful to know, for example, why the
kernel was copying a page.
"""
So I think it's better to have at least one stack dumps. Also what the commit
6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops") and commit
026ee1f66aaa ("panic: fix stack dump print on direct call to panic()") want
to do is avoiding nested stack-dumping to have the original oops data being
scrolled away on a 80x50 screen but to have *at least one backtraces*. So
this patch acts more like a BUGFIX to ensure having at least one backtraces
in mce_panic(). What's your thought, Luck?
Thanks,
Miaohe Lin
Powered by blists - more mailing lists