Thread (27 messages) 27 messages, 4 authors, 2021-05-10

Re: [PATCH] mm/gup: check page posion status for coredump.

From: Aili Yao <hidden>
Date: 2021-03-18 03:16:33
Also in: lkml

On Wed, 17 Mar 2021 10:12:02 +0100
David Hildenbrand [off-list ref] 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.
quoted
+
  	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help