lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/gup: check page posion status for coredump.
On Wed, 17 Mar 2021 10:12:02 +0100
David Hildenbrand <david@redhat.com> wrote:

>
> I wonder if a simple
>
> if (PageHWPoison(compound_head(page)))
> ret = 0;
>
> won't suffice. But I guess the "issue" is compound pages that are not
> huge pages or transparent huge pages.

Yes, the simple case won't suffice, as we mark the hugetlb page poison in head, and
other cases in the specific single page struct.

> If not, we certainly want a wrapper for that magic, otherwise we have to
> replicate the same logic all over the place.
>
> > +
> > return (ret == 1) ? page : NULL;
> > }
> > #endif /* CONFIG_ELF_CORE */
> >
>
>

Yes, May other places meet the requirements as the coredump meets, it's better to make a
wrapper for this. But i am not familiar with the specific scenario, so this patch only cover
the coredump case.

I will post a v2 patch for this.

--
Thanks!
Aili Yao

\
 
 \ /
  Last update: 2021-03-18 04:17    [W:0.553 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site