Messages in this thread | | | Date | Thu, 14 Feb 2008 22:18:16 +0200 | From | Pekka Enberg <> | Subject | Re: [PATCH 3/4] kmemcheck v4 |
| |
Vegard Nossum wrote: > From 4ce1c09e38b2402dc04f0246916f3c23abe8f3e1 Mon Sep 17 00:00:00 2001 > From: Vegard Nossum <vegard.nossum@gmail.com> > Date: Thu, 14 Feb 2008 19:25:39 +0100 > Subject: [PATCH] kmemcheck: make SLUB use kmemcheck > > With kmemcheck enabled, SLUB needs to do this: > > 1. Request twice as much memory as would normally be needed. The bottom > half > of the memory is what the user actually sees and uses; the upper half > contains the so-called shadow memory, which stores the status of each > byte > in the bottom half, e.g. initialized or uninitialized. > 2. Tell kmemcheck which parts of memory that should be marked > uninitialized. > There are actually a few more states, such as "not yet allocated" and > "recently freed". > > If a slab cache is set up using the SLAB_NOTRACK flag, it will never return > memory that can take page faults because of kmemcheck. > > If a slab cache is NOT set up using the SLAB_NOTRACK flag, callers can > still > request memory with the __GFP_NOTRACK flag. This does not prevent the page > faults from occuring, however, but marks the object in question as being > initialized so that no warnings will ever be produced for this object. > > Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
Looks good to me.
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
| |