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:   Mon, 26 Oct 2020 18:33:55 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Alexander Potapenko <glider@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Michal Hocko <mhocko@...nel.org>,
        David Hildenbrand <david@...hat.com>,
        Mateusz Nosek <mateusznosek0@...il.com>,
        Vlastimil Babka <vbabka@...e.cz>
Subject: [PATCH 0/3] optimize handling of memory debugging parameters

We currently have several kernel parameters that affect page allocator wrt
debugging and hardening, some also with config options: init_on_alloc,
init_on_free, page_poison, debug_pagealloc.

These options generally have their own static keys, but sometimes a decision
for e.g. clearing a page depends on multiple options, and the handling is not
as efficient as it could be. This series addresses that by centralizing the
decisions into a new init_mem_debugging() function that enables individual
static keys, and most paths now rely on a single static key check. Subtle
dependency on the order of parameters is also eliminated (Patch 1). The result
is more efficient and hopefully also more readable code.

Vlastimil Babka (3):
  mm, page_alloc: do not rely on the order of page_poison and
    init_on_alloc/free parameters
  mm, page_poison: use static key more efficiently
  mm, page_alloc: reduce static keys in prep_new_page()

 drivers/virtio/virtio_balloon.c |   2 +-
 include/linux/mm.h              |  36 ++++-----
 init/main.c                     |   2 +-
 mm/page_alloc.c                 | 126 ++++++++++++++++++--------------
 mm/page_poison.c                |  40 ++--------
 5 files changed, 97 insertions(+), 109 deletions(-)

-- 
2.29.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ