[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220627064830.GC2159330@hori.linux.bs1.fc.nec.co.jp>
Date: Mon, 27 Jun 2022 06:48:31 +0000
From: HORIGUCHI NAOYA(堀口 直也)
<naoya.horiguchi@....com>
To: Mike Kravetz <mike.kravetz@...cle.com>
CC: Naoya Horiguchi <nao.horiguchi@...il.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Liu Shixin <liushixin2@...wei.com>,
Yang Shi <shy828301@...il.com>,
Oscar Salvador <osalvador@...e.de>,
Muchun Song <songmuchun@...edance.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/9] mm/hugetlb: separate path for hwpoison entry in
copy_hugetlb_page_range()
On Fri, Jun 24, 2022 at 01:57:57PM -0700, Mike Kravetz wrote:
> On 06/24/22 08:51, Naoya Horiguchi wrote:
> > From: Naoya Horiguchi <naoya.horiguchi@....com>
> >
> > Originally copy_hugetlb_page_range() handles migration entries and hwpoisone
> > entries in similar manner. But recently the related code path has more code
> > for migration entries, and when is_writable_migration_entry() was converted
> > to !is_readable_migration_entry(), hwpoison entries on source processes got
> > to be unexpectedly updated (which is legitimate for migration entries, but
> > not for hwpoison entries). This results in unexpected serious issues like
> > kernel panic when foking processes with hwpoison entries in pmd.
> >
> > Separate the if branch into one for hwpoison entries and one for migration
> > entries.
> >
> > Fixes: 6c287605fd56 ("mm: remember exclusively mapped anonymous pages with PG_anon_exclusive")
> > Signed-off-by: Naoya Horiguchi <naoya.horiguchi@....com>
> > Cc: <stable@...r.kernel.org> # 5.18
> > ---
> > mm/hugetlb.c | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
>
> Thank you!
>
> Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
> (with typos pointed out by Miaohe Lin)
>
> Just curious, are there any hwpoisoned tests in any test suite? I run
> libhugetlbfs tests and ltp on a regular basis which sometimes catch
> regressions. If there are no tests in any suite today, this might be
> something we want to consider for future work.
mce-tests (https://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git) has
some test cases about hwpoison (under cases/function/hwpoison/), but this
tool mostly focuses on MCE and does not have enough hwpoison testcases.
So I'm maintaining my own test suite
(https://github.com/nhoriguchi/mm_regression) for long to help my own
hwpoison development/maintenance. I'd like to make this tool more handy
so that other developers or testsuites can easily run the hwpoison testing,
although I need more work for it.
Thanks,
Naoya Horiguchi
Powered by blists - more mailing lists