lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Jul 2021 15:37:35 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Michal Simek <monstr@...str.eu>, Mike Rapoport <rppt@...nel.org>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH 0/4] mm: ensure consistency of memory map poisoning

From: Mike Rapoport <rppt@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ