linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] mm: ensure consistency of memory map poisoning
@ 2021-07-14 12:37 Mike Rapoport
  2021-07-14 12:37 ` [PATCH 1/4] mm/page_alloc: always initialize memory map for the holes Mike Rapoport
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Mike Rapoport @ 2021-07-14 12:37 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Simek, Mike Rapoport, Mike Rapoport, linux-kernel, linux-mm

From: Mike Rapoport <rppt@linux.ibm.com>

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
-- 
2.28.0



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-08-25 12:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 12:37 [PATCH 0/4] mm: ensure consistency of memory map poisoning Mike Rapoport
2021-07-14 12:37 ` [PATCH 1/4] mm/page_alloc: always initialize memory map for the holes Mike Rapoport
2021-07-31 16:56   ` Guenter Roeck
2021-07-31 18:30     ` Mike Rapoport
2021-07-31 19:11       ` Guenter Roeck
2021-08-25 12:11   ` David Hildenbrand
2021-07-14 12:37 ` [PATCH 2/4] microblaze: simplify pte_alloc_one_kernel() Mike Rapoport
2021-08-25 10:09   ` Michal Simek
2021-08-25 12:13   ` David Hildenbrand
2021-07-14 12:37 ` [PATCH 3/4] mm: introduce memmap_alloc() to unify memory map allocation Mike Rapoport
2021-07-14 22:32   ` Andrew Morton
2021-07-15  6:10     ` Mike Rapoport
2021-07-14 12:37 ` [PATCH 4/4] memblock: stop poisoning raw allocations Mike Rapoport
2021-07-31 17:13   ` Joe Perches
2021-08-03  7:58     ` Mike Rapoport
2021-08-03 16:19       ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).