archive mirror
 help / color / mirror / Atom feed
From: Christopher Lameter <>
To: David Rientjes <>
Cc: Vlastimil Babka <>,
	Kees Cook <>,  Jann Horn <>,
	Pekka Enberg <>,
	 Joonsoo Kim <>,
	 Andrew Morton <>,
	Linux-MM <>,
	 kernel list <>,
	 Matthew Garrett <>,
	 Vijayanand Jitta <>
Subject: Re: SLUB: sysfs lets root force slab order below required minimum, causing memory corruption
Date: Sun, 8 Mar 2020 19:34:24 +0000 (UTC)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, 4 Mar 2020, David Rientjes wrote:

> I'm not sure how dependent the CONFIG_SLUB_DEBUG users are on being able
> to modify these are runtime (they've been around for 12+ years) but I
> agree that it seems particularly dangerous.

The order of each individual slab page is stored in struct page. That is
why every slub slab page can have a different order. This enabled fallback
to order 0 allocations and also allows a dynamic configuration of the
order at runtime.

> The slub_debug kernel command line options are already pretty
> comprehensive as described by Documentation/vm/slub.rst.  I *think* these
> tunables were primarily introduced for kernel debugging and not general
> purpose, perhaps with the exception of "order".

What do you mean by "general purpose? Certainly the allocator should not
blow up when forcing zero order allocations.

> So I think we may be able to fix "order" with a combination of my patch as
> well as a fix to the freelist randomization and that the others should
> likely be made read only.

Hmmm. races increases as more metadata is added that is depending on the
size of the slab page and the number of objects in it.

  reply	other threads:[~2020-03-08 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04  0:23 SLUB: sysfs lets root force slab order below required minimum, causing memory corruption Jann Horn
2020-03-04  1:26 ` David Rientjes
2020-03-04  2:22   ` Kees Cook
2020-03-04 17:26     ` Vlastimil Babka
2020-03-04 20:39       ` David Rientjes
2020-03-08 19:34         ` Christopher Lameter [this message]
2020-03-04 14:57   ` Pekka Enberg
2020-03-04 13:17 ` Vlastimil Babka

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).