[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <76b50214-fcf8-37fe-47c9-cfcaf7517048@huawei.com>
Date: Fri, 26 May 2023 09:57:40 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Dave Hansen <dave.hansen@...el.com>,
Tony Luck <tony.luck@...el.com>,
Borislav Petkov <bp@...en8.de>,
Naoya Horiguchi <naoya.horiguchi@....com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, <x86@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
<linux-edac@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>, <jane.chu@...cle.com>
Subject: Re: [PATCH] x86/mce: set MCE_IN_KERNEL_COPYIN for all MC-Safe Copy
On 2023/5/26 1:18, Dave Hansen wrote:
> On 5/7/23 19:22, Kefeng Wang wrote:
>> Both EX_TYPE_FAULT_MCE_SAFE and EX_TYPE_DEFAULT_MCE_SAFE exception
>> fixup types are used to identify fixups which allow in kernel #MC
>> recovery, that is the Machine Check Safe Copy.
>>
>> For now, the MCE_IN_KERNEL_COPYIN flag is only set for EX_TYPE_COPY
>> and EX_TYPE_UACCESS when copy from user, and corrupted page is
>> isolated in this case, for MC-safe copy, memory_failure() is not
>> always called, some places, like __wp_page_copy_user, copy_subpage,
>> copy_user_gigantic_page and ksm_might_need_to_copy manually call
>> memory_failure_queue() to cope with such unhandled error pages,
>> recently coredump hwposion recovery support[1] is asked to do the
>> same thing, and there are some other already existed MC-safe copy
>> scenarios, eg, nvdimm, dm-writecache, dax, which has similar issue.
>
> That has to set some kind of record for run-on sentences. Could you
> please try to rewrite this coherently?
>
>> The best way to fix them is set MCE_IN_KERNEL_COPYIN to MCE_SAFE
>> exception, then kill_me_never() will be queued to call memory_failure()
>> in do_machine_check() to isolate corrupted page, which avoid calling
>> memory_failure_queue() after every MC-safe copy return.
>
> Could you try to send a v2 of this with a clear problem statement?
>
:( will try to make it more clear.
> What is the end user visible effect of the problem and of your solution?
The corrupted page won't be isolated for MC-safe copy scenario, and it
could be accessed again by use application.
Powered by blists - more mailing lists