Re: [PATCH] mce: fix missing stack-dumping in mce_panic()

From: Miaohe Lin
Date: Fri Jan 06 2023 - 21:27:16 EST


On 2023/1/7 1:42, Luck, Tony wrote:
>> Agree. A stack dump won't be helpful in this case. But I tend to keep the stack dump in case
>> it would be helpful and also make mce_panic() dumps the stack as expected. What do you think?
>
> My #1 preference is to just get stack dumps from machine checks where the cause is known
> to be poison consumption by the kernel.
>
> Patches to do this were posted in September 2022
>
> https://lore.kernel.org/all/20220922195136.54575-1-tony.luck@xxxxxxxxx/

[1]

>
> Boris has applied part 1 (which was a cleanup). But discussion on part 2
> centered around why mce_panic() wasn't giving a full OOPs dump. That's
> now understood.
>

Many thanks for your valuable information. [1] uses MCE_PANIC_STACKDUMP_SEVERITY to
pick the preferred ones and do a stack dump manually. But now stack dumps is done
via panic(), it seems there's no easy way to achieve #1 preference.

>
> If I can't get my first preference ... then a stack dump for every machine check
> is better than no stack dumps at all. So a patch that enables the OOPs dump
> would be a good second choice.
>
> I don't want to stick with the current behavior of no stack dumps.

As a first step, let's change the current behavior of no stack dumps first? And then,
we could try to achieve #1 preference if possible.

Thanks,
Miaohe Lin