From: Borislav Petkov <bp@alien8.de>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: tony.luck@intel.com, naoya.horiguchi@nec.com, tglx@linutronix.de,
mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org,
akpm@linux-foundation.org, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
jane.chu@oracle.com
Subject: Re: [PATCH v2] x86/mce: set MCE_IN_KERNEL_COPYIN for all MC-Safe Copy
Date: Fri, 26 May 2023 09:09:52 +0200 [thread overview]
Message-ID: <20230526070952.GAZHBbQNAWZJP6tOXv@nazgul.local> (raw)
In-Reply-To: <20230526063242.133656-1-wangkefeng.wang@huawei.com>
On Fri, May 26, 2023 at 02:32:42PM +0800, Kefeng Wang wrote:
> The best way to fix them is set MCE_IN_KERNEL_COPYIN for MC-Safe Copy,
> then let the core do_machine_check() to isolate corrupted page instead
> of doing it one-by-one.
No, this whole thing is confused.
* Indicates an MCE that happened in kernel space while copying data
* from user.
#define MCE_IN_KERNEL_COPYIN
This is a very specific exception type: EX_TYPE_COPY which got added by
278b917f8cb9 ("x86/mce: Add _ASM_EXTABLE_CPY for copy user access")
but Linus then removed all such user copy exception points in
034ff37d3407 ("x86: rewrite '__copy_user_nocache' function")
So now that EX_TYPE_COPY never happens.
And what you're doing is lumping the handling for
EX_TYPE_DEFAULT_MCE_SAFE and EX_TYPE_FAULT_MCE_SAFE together and saying
that the MCE happened while copying data from user.
And XSTATE_OP() is one example where this is not really the case.
So no, this is not correct.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2023-05-26 7:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 6:32 Kefeng Wang
2023-05-26 7:09 ` Borislav Petkov [this message]
2023-05-26 12:18 ` Kefeng Wang
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=20230526070952.GAZHBbQNAWZJP6tOXv@nazgul.local \
--to=bp@alien8.de \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=jane.chu@oracle.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=naoya.horiguchi@nec.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=wangkefeng.wang@huawei.com \
--cc=x86@kernel.org \
/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