RE: [PATCH v3] x86/mce: Set PG_hwpoison page flag to avoid the capture kernel panic

From: Luck, Tony
Date: Mon Oct 16 2023 - 21:25:03 EST


> I understand what you mean. Looks I didn't express myself well on this
> point and caused ambiguity. Maybe removing the attributive clause would
> make it brief and clear? Such as,
>
> For some MCE fatal error cases, the kernel might call
> mce_panic() to terminate the production kernel directly, there
> is no opportunity to queue a task for calling memory_failure().

How about:

When there is a fatal machine check Linux calls mce_panic()
without checking to see if bad data at some memory address
was reported in the machine check banks.

If kexec is enabled, check for memory errors and mark the
page as poisoned so that the kexec'd kernel can avoid accessing
the page.

-Tony