[PATCH] kmemleak: Allow kmemleak to be built on powerpc

Michael Ellerman michael at ellerman.id.au
Fri Jul 17 10:29:18 EST 2009


On Thu, 2009-07-16 at 18:52 +0100, Catalin Marinas wrote:
> On Thu, 2009-07-16 at 17:43 +1000, Michael Ellerman wrote:
> > On Thu, 2009-07-16 at 11:25 +1000, Michael Ellerman wrote:
> > > Very lightly tested, doesn't crash the kernel.
> > > 
> > > Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
> > > ---
> > > 
> > > It doesn't look like we actually need to add any support in the
> > > arch code - or is there something I'm missing?
> > 
> > Hmm, I think we want to add annotations in lib/lmb.c don't we? That's
> > our low-level pre-bootmem allocator.
> 
> Yes, I think so (I'm not using this on ARM or x86 so I can't really test
> it). Without these hooks, there kmemleak reports aren't that useful
> (probably too many).

The wrinkle is that lmb never frees, so by definition it can't leak :)

But we could have memory allocated with lmb that has pointers to other
objects allocated later, and we want kmemleak to scan the lmb allocated
blocks to find those references.

So the question is do we need to annotate lmb so that will happen, or
does kmemleak scan all kernel memory, regardless of where it's
allocated?

cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090717/9ca208ca/attachment.pgp>


More information about the Linuxppc-dev mailing list