[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d6f9dd6-0171-4bcb-d611-1f522a1e8c8c@huawei.com>
Date: Mon, 1 Apr 2024 11:41:56 +0800
From: Tong Tiangen <tongtiangen@...wei.com>
To: Borislav Petkov <bp@...en8.de>
CC: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
<wangkefeng.wang@...wei.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
<x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>, Tony Luck
<tony.luck@...el.com>, Andy Lutomirski <luto@...nel.org>, Peter Zijlstra
<peterz@...radead.org>, Andrew Morton <akpm@...ux-foundation.org>, Naoya
Horiguchi <naoya.horiguchi@....com>, <linux-kernel@...r.kernel.org>,
<linux-edac@...r.kernel.org>, <linux-mm@...ck.org>, Guohanjun
<guohanjun@...wei.com>
Subject: Re: [PATCH -next v5 2/3] x86/mce: set MCE_IN_KERNEL_COPYIN for
DEFAULT_MCE_SAFE exception
在 2024/3/28 6:05, Borislav Petkov 写道:
> On Sun, Feb 18, 2024 at 06:08:14PM +0800, Tong Tiangen wrote:
>> 1. The copy_mc_to_kernel() is used in the coredump, KSM, and COW
>> scenarios, in these scenarios, the src mem stores the user data and the
>> kernel use kernel address to access the src mem(using kmap()).
>>
>> 2. the src mem of copy_mc_to_user() is currently only used by the DAX:
>
> You mean just because it currently is used somewhere which probably is
> ok - no clue what DAX does - and even if the source address is still
> *kernel* memory and even at the danger that someone else might use it in
> the future and think the handling on a potential #MC is ok, you're still
> arguing that this is the right thing to do perhaps because it fits your
> use case?!
>
> Sorry Tiangen, not gonna happen.
>
I left the office last week and felt sorry for the lateness of the
reply.
You are right. Our current processing is based on "experience" rather
than interface constraints.
is_copy_from_user() determines whether a user is a "copy user" based on
fault_in_kernel_space(). Therefore, it returns false for
copy_mc_to_kernel()/copy_mc_to_user(). As a result, MCE_IN_KERNEL_COPYIN
cannot be set in error_context().
Comprehensive consideration of all factors, it is better to manually
call memory_failure_queue() to handle this problem case by case.
Finally, do we consider accepting only the patch 1/3 ?
Thanks,
Tong.
Powered by blists - more mailing lists