[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250307232230.GMZ8t_tja324AQqYME@fat_crate.local>
Date: Sat, 8 Mar 2025 00:22:30 +0100
From: Borislav Petkov <bp@...en8.de>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Shuai Xue <xueshuai@...ux.alibaba.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"yazen.ghannam@....com" <yazen.ghannam@....com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linmiaohe@...wei.com" <linmiaohe@...wei.com>,
"nao.horiguchi@...il.com" <nao.horiguchi@...il.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
"jpoimboe@...nel.org" <jpoimboe@...nel.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"baolin.wang@...ux.alibaba.com" <baolin.wang@...ux.alibaba.com>,
"tianruidong@...ux.alibaba.com" <tianruidong@...ux.alibaba.com>
Subject: Re: [PATCH v4 1/3] x86/mce: Use is_copy_from_user() to determine
copy-from-user context
On Fri, Mar 07, 2025 at 11:11:26PM +0000, Luck, Tony wrote:
> As for "explicit markup" I don't think it would be better to decorate
> every get_user() and copy_from_user() with some "this one can
> recover from #MC"
I don't mean every function - I mean what we had there with EX_TYPE_UACCESS.
That is explicit and unambiguous. Proving that is_copy_from_user() is always
correct is a lot harder.
> Note also that "what we had recently" was fragile, broke, and resulted
> in this regression.
Because those exception types got renamed? Oh well, that should've been
reverted actually but no one involved realized that MCE is using those.
And I'm not saying this is the only way to solve this. We could do something
like collecting all addresses on which an MCE can be recoverable, for example.
We haven't considered it that important... yet.
Looks like we're going to try this new is_copy_from_user() thing now and then
see where it gets us.
So, after the commit message has been fixed:
Acked-by: Borislav Petkov (AMD) <bp@...en8.de>
I'm presuming, this is going through akpm...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists