From: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@redhat.com>,
zhenwei pi <pizhenwei@bytedance.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tony Luck <tony.luck@intel.com>,
Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH] mm/memory-failure: don't allow to unpoison hw corrupted page
Date: Tue, 7 Jun 2022 23:43:07 +0000 [thread overview]
Message-ID: <20220607234306.GA1400839@hori.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20220607145959.785e54c752f373bcc283732b@linux-foundation.org>
On Tue, Jun 07, 2022 at 02:59:59PM -0700, Andrew Morton wrote:
> On Tue, 7 Jun 2022 14:36:00 +0200 David Hildenbrand <david@redhat.com> wrote:
>
> > On 06.06.22 11:15, HORIGUCHI NAOYA(堀口 直也) wrote:
> > >>> [ 917.864266] <TASK>
> > >>> [ 917.864961] clear_huge_page+0x147/0x270
> > >>> [ 917.866236] hugetlb_fault+0x440/0xad0
> > >>> [ 917.867366] handle_mm_fault+0x270/0x290
> > >>> [ 917.868532] do_user_addr_fault+0x1c3/0x680
> > >>> [ 917.869768] exc_page_fault+0x6c/0x160
> > >>> [ 917.870912] ? asm_exc_page_fault+0x8/0x30
> > >>> [ 917.872082] asm_exc_page_fault+0x1e/0x30
> > >>> [ 917.873220] RIP: 0033:0x7f2aeb8ba367
> > >>>
> > >>> I don't think of a workaround for this now ...
> > >>>
> > >>
> > >> Could you please tell me how to reproduce this issue?
> > >
> > > You are familiar with qemu-monitor-command, so the following procedure
> > > should work for you:
> > >
> > > - run a process using hugepages on your VM,
> > > - check the guest physical address of the hugepage (page-types.c is helpful for this),
> > > - inject a MCE with virsh qemu-monitor-command on the guest physical address, then
> > > - unpoison the injected physical address.
> >
> > That's triggered via debugfs / HWPOISON_INJECT, right?
> >
> > That's a DEBUG_KERNEL option, so I'm not 100% sure if we really want to
> > cc stable.
Sure, the impact of the bug is limited.
>
> Sure, it's hardly a must-have. But let's also take the patch
> complexity&risk into account. This is one dang simple patch.
>
> Or is it. Should these things be happening outside mf_mutex? What the
> heck is the role of mf_mutex anyway?
mf_mutex is to ensure that only one error handling thread can handle
the pfn at one time, but set_mce_nospec() is called outside it now.
So if we want to prevent the race with unmap, both of set_mce_nospec()
and the new kpte check might need to be done in mf_mutex.
- Naoya Horiguchi
next prev parent reply other threads:[~2022-06-07 23:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-04 10:32 zhenwei pi
2022-06-04 18:56 ` Andrew Morton
2022-06-05 4:24 ` zhenwei pi
2022-06-06 4:32 ` HORIGUCHI NAOYA(堀口 直也)
2022-06-06 7:20 ` zhenwei pi
2022-06-06 9:15 ` HORIGUCHI NAOYA(堀口 直也)
2022-06-07 12:36 ` David Hildenbrand
2022-06-07 21:59 ` Andrew Morton
2022-06-07 23:43 ` HORIGUCHI NAOYA(堀口 直也) [this message]
2022-06-08 3:06 ` zhenwei pi
2022-06-08 9:45 ` David Hildenbrand
2022-06-07 11:50 ` Miaohe Lin
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=20220607234306.GA1400839@hori.linux.bs1.fc.nec.co.jp \
--to=naoya.horiguchi@nec.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pizhenwei@bytedance.com \
--cc=tony.luck@intel.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