Re: [PATCH 0/8] mm/slub: Add SLUB_RANDOMIZE support

From: Pekka Enberg
Date: Wed Mar 16 2011 - 02:23:59 EST

Hi Matt,

On Sun, 2011-03-13 at 20:20 -0400, George Spelvin wrote:
>> As a followup to the "[PATCH] Make /proc/slabinfo 0400" thread, this
>> is a patch series to randomize the order of object allocations within
>> a page.  It can be extended to SLAB and SLOB if desired.  Mostly it's
>> for benchmarking and discussion.

On Wed, Mar 16, 2011 at 4:57 AM, Matt Mackall <mpm@xxxxxxxxxxx> wrote:
> I've spent a while thinking about this over the past few weeks, and I
> really don't think it's productive to try to randomize the allocators.
> It provides negligible defense and just makes life harder for kernel
> hackers.

If it's an optional feature and the impact on the code is low (as it
seems to be), what's the downside? Combined with disabling SLUB's slab
merging, randomization should definitely make it more difficult to
have full control over a full slab. I don't know how much defense it
will provide but I think randomization is definitely an option worth

> (And you definitely can't randomize SLOB like this.)

No, you can't but heap exploits like the one we discuss are slightly
harder with SLOB anyway, no?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at