Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Mike Kravetz
On 2/18/21 9:34 AM, Mike Kravetz wrote: > On 2/18/21 9:25 AM, Jason Gunthorpe wrote: >> On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: >>> On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz wrote: > page st

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Zi Yan
On 18 Feb 2021, at 12:51, Mike Kravetz wrote: > On 2/18/21 9:40 AM, Zi Yan wrote: >> On 18 Feb 2021, at 12:32, Jason Gunthorpe wrote: >> >>> On Thu, Feb 18, 2021 at 12:27:58PM -0500, Zi Yan wrote: On 18 Feb 2021, at 12:25, Jason Gunthorpe wrote: > On Thu, Feb 18, 2021 at 02:45:54PM +

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Mike Kravetz
On 2/18/21 9:40 AM, Zi Yan wrote: > On 18 Feb 2021, at 12:32, Jason Gunthorpe wrote: > >> On Thu, Feb 18, 2021 at 12:27:58PM -0500, Zi Yan wrote: >>> On 18 Feb 2021, at 12:25, Jason Gunthorpe wrote: >>> On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: > On Wed, Feb 17, 2021

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Zi Yan
On 18 Feb 2021, at 12:32, Jason Gunthorpe wrote: > On Thu, Feb 18, 2021 at 12:27:58PM -0500, Zi Yan wrote: >> On 18 Feb 2021, at 12:25, Jason Gunthorpe wrote: >> >>> On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote:

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Mike Kravetz
On 2/18/21 9:25 AM, Jason Gunthorpe wrote: > On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: >> On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: >>> On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz >>> wrote: page structs are not guaranteed to be contiguous for g

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Jason Gunthorpe
On Thu, Feb 18, 2021 at 12:27:58PM -0500, Zi Yan wrote: > On 18 Feb 2021, at 12:25, Jason Gunthorpe wrote: > > > On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: > >> On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: > >>> On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Zi Yan
On 18 Feb 2021, at 12:25, Jason Gunthorpe wrote: > On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: >> On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: >>> On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz >>> wrote: page structs are not guaranteed to be contiguou

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Jason Gunthorpe
On Thu, Feb 18, 2021 at 02:45:54PM +, Matthew Wilcox wrote: > On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: > > On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz > > wrote: > > > page structs are not guaranteed to be contiguous for gigantic pages. The > > > > June 2014. That'

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-18 Thread Matthew Wilcox
On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: > On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz > wrote: > > page structs are not guaranteed to be contiguous for gigantic pages. The > > June 2014. That's a long lurk time for a bug. I wonder if some later > commit revealed it.

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-17 Thread Mike Kravetz
On 2/17/21 11:02 AM, Andrew Morton wrote: > On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz > wrote: > >> page structs are not guaranteed to be contiguous for gigantic pages. The >> routine update_and_free_page can encounter a gigantic page, yet it assumes >> page structs are contiguous when se

Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption

2021-02-17 Thread Andrew Morton
On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz wrote: > page structs are not guaranteed to be contiguous for gigantic pages. The > routine update_and_free_page can encounter a gigantic page, yet it assumes > page structs are contiguous when setting page flags in subpages. > > If update_and_fre