linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Shuai Xue <xueshuai@linux.alibaba.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"yazen.ghannam@amd.com" <yazen.ghannam@amd.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linmiaohe@huawei.com" <linmiaohe@huawei.com>,
	"nao.horiguchi@gmail.com" <nao.horiguchi@gmail.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
	"tianruidong@linux.alibaba.com" <tianruidong@linux.alibaba.com>
Subject: Re: [PATCH v4 1/3] x86/mce: Use is_copy_from_user() to determine copy-from-user context
Date: Sat, 8 Mar 2025 00:22:30 +0100	[thread overview]
Message-ID: <20250307232230.GMZ8t_tja324AQqYME@fat_crate.local> (raw)
In-Reply-To: <SJ1PR11MB6083223A3175F7A84EC4DDDFFCD52@SJ1PR11MB6083.namprd11.prod.outlook.com>

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@alien8.de>

I'm presuming, this is going through akpm...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette


  reply	other threads:[~2025-03-07 23:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07  5:44 [PATCH v4 0/3] mm/hwpoison: Fix regressions in memory failure handling Shuai Xue
2025-03-07  5:44 ` [PATCH v4 1/3] x86/mce: Use is_copy_from_user() to determine copy-from-user context Shuai Xue
2025-03-07 20:40   ` Borislav Petkov
2025-03-07 22:05     ` Luck, Tony
2025-03-07 22:46       ` Borislav Petkov
2025-03-07 23:11         ` Luck, Tony
2025-03-07 23:22           ` Borislav Petkov [this message]
2025-03-08 11:27             ` Shuai Xue
2025-03-08 11:25     ` Shuai Xue
2025-03-07  5:44 ` [PATCH v4 2/3] mm/hwpoison: Do not send SIGBUS to processes with recovered clean pages Shuai Xue
2025-03-12  6:39   ` Miaohe Lin
2025-03-12  8:03     ` Shuai Xue
2025-03-07  5:44 ` [PATCH v4 3/3] mm: memory-failure: Enhance comments for return value of memory_failure() Shuai Xue
2025-03-07 17:20 ` [PATCH v4 0/3] mm/hwpoison: Fix regressions in memory failure handling Luck, Tony
2025-03-08 11:36   ` Shuai Xue
2025-03-12 11:28 Shuai Xue
2025-03-12 11:28 ` [PATCH v4 1/3] x86/mce: Use is_copy_from_user() to determine copy-from-user context Shuai Xue

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=20250307232230.GMZ8t_tja324AQqYME@fat_crate.local \
    --to=bp@alien8.de \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@kernel.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=nao.horiguchi@gmail.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tianruidong@linux.alibaba.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    --cc=yazen.ghannam@amd.com \
    /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