Linux Documentation
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Chris Down <chris@chrisdown.name>
Cc: Vlastimil Babka <vbabka@kernel.org>, Harry Yoo <harry@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Marco Elver <elver@google.com>,
	GONG Ruiqi <gongruiqi@huaweicloud.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-mm@kvack.org, linux-hardening@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH v2 6/6] slub_kunit: Add a test for the kmalloc_partition boot parameter
Date: Fri, 30 Oct 2026 21:29:26 -0700	[thread overview]
Message-ID: <202610302128.1009F254@keescook> (raw)
In-Reply-To: <66f981ce04dfb01d02d1683bb18ba6db1c4eabd1.1793253633.git.chris@chrisdown.name>

On Thu, Oct 29, 2026 at 02:09:21PM +0800, Chris Down wrote:
> Check that the kmalloc partitions are separate caches by default, and
> alias the normal kmalloc caches when they're turned off with
> kmalloc_partition=0.
> 
> Signed-off-by: Chris Down <chris@chrisdown.name>
> ---
>  lib/tests/slub_kunit.c | 46 ++++++++++++++++++++++++++++++++++++++++++
>  mm/slab.h              |  4 ++++
>  mm/slab_common.c       |  3 ++-
>  3 files changed, 52 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/tests/slub_kunit.c b/lib/tests/slub_kunit.c
> index 670645875b27..e3035864577d 100644
> --- a/lib/tests/slub_kunit.c
> +++ b/lib/tests/slub_kunit.c
> @@ -333,6 +333,49 @@ static void test_slab_buckets(struct kunit *test)
>  }
>  #endif
>  
> +#ifdef CONFIG_KMALLOC_PARTITION_CACHES

Same feedback as the other test: let's get rid of all this ifdef-ery :)

-- 
Kees Cook

      reply	other threads:[~2026-10-31  4:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  6:07 [PATCH v2 0/6] mm/slab: Support selecting slab hardening features at boot Chris Down
2026-10-29  6:07 ` [PATCH v2 1/6] mm/slab: Enable SLAB_FREELIST_HARDENED by default Chris Down
2026-10-31  4:13   ` Kees Cook
2026-10-29  6:07 ` [PATCH v2 2/6] mm/slab: Enable SLAB_FREELIST_RANDOM " Chris Down
2026-10-31  4:15   ` Kees Cook
2026-10-29  6:08 ` [PATCH v2 3/6] mm/slab: Support disabling SLAB_BUCKETS at boot Chris Down
2026-10-31  4:17   ` Kees Cook
2026-10-29  6:08 ` [PATCH v2 4/6] slub_kunit: Add a test for the slab_buckets boot parameter Chris Down
2026-10-31  4:22   ` Kees Cook
2026-10-29  6:09 ` [PATCH v2 5/6] mm/slab: Support disabling KMALLOC_PARTITION_CACHES at boot Chris Down
2026-10-31  4:28   ` Kees Cook
2026-10-29  6:09 ` [PATCH v2 6/6] slub_kunit: Add a test for the kmalloc_partition boot parameter Chris Down
2026-10-31  4:29   ` Kees Cook [this message]

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=202610302128.1009F254@keescook \
    --to=kees@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chris@chrisdown.name \
    --cc=cl@gentwo.org \
    --cc=corbet@lwn.net \
    --cc=elver@google.com \
    --cc=gongruiqi@huaweicloud.com \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@kernel.org \
    /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