Skip to content

mm: ensure consistency of memory map poisoning

Mike Rapoport linux-mm lkml 1 version Applied

Status from this message: [merged] memblock-stop-poisoning-raw-allocations.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 11 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4mm/page_alloc: always initialize memory map for the holesmm/page_alloc.c+0 -84 repliesApplied
2/4microblaze: simplify pte_alloc_one_kernel()arch/microblaze/include/asm/pgtable.h arch/microblaze/mm/init.c arch/microblaze/mm/pgtable.c+8 -232 repliesApplied
3/4mm: introduce memmap_alloc() to unify memory map allocationmm/internal.h mm/page_alloc.c mm/sparse.c+28 -62 repliesApplied
4/4memblock: stop poisoning raw allocationsmm/memblock.c+4 -163 repliesApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchGuenter RoeckMichal SimekDavid Hildenbrand
1/4T-b A-b
2/4T-b R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/4] mm: ensure consistency of memory map poisoning

From: Mike Rapoport <[email protected]>

Hi,

Currently memory map allocation for FLATMEM case does not poison the struct pages regardless of CONFIG_PAGE_POISON setting.

This happens because allocation of the memory map for FLATMEM and SPARSMEM use different memblock functions and those that are used for SPARSMEM case (namely memblock_alloc_try_nid_raw() and memblock_alloc_exact_nid_raw()) implicitly poison the allocated memory.

Another side effect of this implicit poisoning is that early setup code that uses the same functions to allocate memory burns cycles for the memory poisoning even if it was not intended.

These patches introduce memmap_alloc() wrapper that ensure that the memory map allocation is consistent for different memory models.

Mike Rapoport (4):
mm/page_alloc: always initialize memory map for the holes
microblaze: simplify pte_alloc_one_kernel()
mm: introduce memmap_alloc() to unify memory map allocation
memblock: stop poisoning raw allocations

 arch/microblaze/include/asm/pgtable.h |  2 --
 arch/microblaze/mm/init.c             | 12 ----------
 arch/microblaze/mm/pgtable.c          | 17 +++++++-------
 mm/internal.h                         |  4 ++++
 mm/memblock.c                         | 20 ++++-------------
 mm/page_alloc.c                       | 32 ++++++++++++++++++---------
 mm/sparse.c                           |  6 ++---
 7 files changed, 40 insertions(+), 53 deletions(-)

base-commit: e73f0f0ee7541171d89f2e2491130c7771ba58d3

Signature · 1 line
2.28.0