Re: [kernel-hardening] Re: [RFC PATCH 2/2] mm: restrict access to/proc/slabinfo

From: David Rientjes
Date: Mon Sep 19 2011 - 16:59:30 EST


On Mon, 19 Sep 2011, Pekka Enberg wrote:

> Well, sure. I was actually planning to rip out SLUB merging completely
> because it makes /proc/slabinfo so useless but never got around doing
> that.

Ripping out cache merging entirely for the benefit of an interface seems
like overkill, it actually allows the allocator to return cache-hot
objects that has a small but measurable impact on performance for some
networking loads. It would probably be better to increase awareness of
slabinfo -a and the use of slub_nomerge on the command line when debugging
issues. The most complete solution would be to move everything out of
struct kmem_cache except what is necessary for slabinfo and then point to
the actual cache data structure that could be shared by merged caches.
That's not hard to do, but would add an increment to both the alloc and
free fastpaths and require some surgery throughout all of the slub code to
understand the new data structures and that would be a pretty big patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/