From: Kees Cook <keescook@chromium.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Halbuer <halbuer@sra.uni-hannover.de>,
"linux-hardening@vger.kernel.org"
<linux-hardening@vger.kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH] mm: reduce lock contention of pcp buffer refill
Date: Tue, 14 Feb 2023 09:27:52 -0800 [thread overview]
Message-ID: <63ebc499.a70a0220.9ac51.29ea@mx.google.com> (raw)
In-Reply-To: <70fc9040-f976-0314-46e8-d9ddad82ccf5@suse.cz>
On Wed, Feb 08, 2023 at 11:45:14AM +0100, Vlastimil Babka wrote:
> But I wonder also what kernel hardening folks think here - are the hardened
> kernels usually built with DEBUG_VM or debug_pagealloc enabled, or would you
> like to hook some other kernel option for keeping the checks on page/alloc
> free active? And should those checks be done on every alloc/free, including
> pcplist cached allocations?
What we're depending on for heap-related (i.e. both page allocator and
slab) hardening currently is:
- CONFIG_SLAB_FREELIST_HARDENED
- pointer obfuscation (SLUB) -- freelist_ptr(), set_freepointer()
- pool membership verification (SLUB and SLAB) -- cache_from_obj()
- consecutive double free detection (SLUB and SLAB) -- __free_one()
- allocation order randomization
- CONFIG_SLAB_FREELIST_RANDOM (SLUB and SLAB)
- CONFIG_SHUFFLE_PAGE_ALLOCATOR (page allocator)
- memory wiping (both slab and page allocator)
- init_on_alloc / CONFIG_INIT_ON_ALLOC_DEFAULT_ON
- init_on_free / CONFIG_INIT_ON_FREE_DEFAULT_ON
I'd be nice to gain slab redzone verification, but that seems expensive
enough that anyone interested in that level of hardening has likely
turned on full KASAN.
--
Kees Cook
next prev parent reply other threads:[~2023-02-14 17:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 16:25 [PATCH] mm: reduce lock contention of pcp buffer refill Alexander Halbuer
2023-02-02 23:25 ` Andrew Morton
2023-02-07 16:11 ` Alexander Halbuer
2023-02-08 15:11 ` Vlastimil Babka
2023-02-09 10:34 ` Alexander Halbuer
2023-02-08 10:45 ` Vlastimil Babka
2023-02-14 17:27 ` Kees Cook [this message]
2023-02-08 15:20 ` Vlastimil Babka
2023-03-29 9:31 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63ebc499.a70a0220.9ac51.29ea@mx.google.com \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=halbuer@sra.uni-hannover.de \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).