mbox series

[v2,0/3] mm: fix max_pfn not falling on section boundary

Message ID 20191211163201.17179-1-david@redhat.com (mailing list archive)
Headers show
Series mm: fix max_pfn not falling on section boundary | expand

Message

David Hildenbrand Dec. 11, 2019, 4:31 p.m. UTC
Playing with different memory sizes for a x86-64 guest, I discovered that
some memmaps (highest section if max_mem does not fall on the section
boundary) are marked as being valid and online, but contain garbage. We
have to properly initialize these memmaps.

Looking at /proc/kpageflags and friends, I found some more issues,
partially related to this.

v1 -> v2:
- "mm: fix uninitialized memmaps on a partially populated last section"
-- Refine patch description (esp. how to reproduce), add tested-by
- "fs/proc/page.c: allow inspection of last section and fix end detection"
-- Make it compile for !CONFIG_SPARSE and add a comment to the new
   helper function

David Hildenbrand (3):
  mm: fix uninitialized memmaps on a partially populated last section
  fs/proc/page.c: allow inspection of last section and fix end detection
  mm: initialize memmap of unavailable memory directly

 fs/proc/page.c     | 30 +++++++++++++++++++++++++++---
 include/linux/mm.h |  6 ------
 mm/page_alloc.c    | 43 ++++++++++++++++++++++++++++++++-----------
 3 files changed, 59 insertions(+), 20 deletions(-)

Comments

Andrew Morton Jan. 31, 2020, 3:52 a.m. UTC | #1
On Wed, 11 Dec 2019 17:31:58 +0100 David Hildenbrand <david@redhat.com> wrote:

> Playing with different memory sizes for a x86-64 guest, I discovered that
> some memmaps (highest section if max_mem does not fall on the section
> boundary) are marked as being valid and online, but contain garbage. We
> have to properly initialize these memmaps.
> 
> Looking at /proc/kpageflags and friends, I found some more issues,
> partially related to this.

We're still showing very little (ie no) review activity on this
patchset.