Re: [PATCH 00/14] Kernel memory leak detector

From: Mike Snitzer
Date: Thu Jan 15 2009 - 17:53:40 EST


On 1/14/09, Catalin Marinas <catalin.marinas@xxxxxxx> wrote:
> On Thu, 2009-01-15 at 01:01 +1100, Stephen Rothwell wrote:
> > On Wed, 14 Jan 2009 12:30:20 +0000 Catalin Marinas <catalin.marinas@xxxxxxx> wrote:
>
> > > Are you OK with applying patches to linux-next (git am) rather than
> > > using git merge? This way I can rebase kmemleak on top of linux-next.
> >
> > I would much prefer a few conflicts to carrying a post linux-next patch
> > because linux-next can change radically day to day - especially since we
> > know there will be clashes in the areas of files you would be patching.
> >
> > So lets use the above git tree and see how we go. OK?
>
>
> It sounds fine. Thanks.

Hi Catalin,

I figured I'd post here so others can weigh in on what I'm seeing with
kmemleak (especially the section mismatch warnings during modpost).

When running your latest git kmemleak branch (as is being pulled into
linux-next AFAIK) I'm still seeing that kmemleak fails to initialize
with:

kmemleak: Early log buffer exceeded
Pid: 0, comm: swapper Not tainted 2.6.29-rc1.devel #2
Call Trace:
[<ffffffff80803276>] log_early+0x26/0x74
[<ffffffff802ad983>] kfree+0x94/0x1eb
[<ffffffff802adefd>] do_tune_cpucache+0x1b1/0x422
[<ffffffff802ae32c>] enable_cpucache+0x63/0xaa
[<ffffffff808031f8>] kmem_cache_init+0x402/0x45a
[<ffffffff8025dd3b>] __mutex_init+0x21/0x32
[<ffffffff807e8b86>] start_kernel+0x297/0x337
[<ffffffff807e8392>] x86_64_start_kernel+0xde/0xe2
Kernel memory leak detector disabled

Now when I built the kernel I got the following:

WARNING: modpost: Found 6 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'

Doing so yields:
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0xaed80): Section mismatch in reference from
the function kmemleak_free() to the function .init.text:log_early()
The function kmemleak_free() references
the function __init log_early().
This is often because kmemleak_free lacks a __init
annotation or the annotation of log_early is wrong.

WARNING: vmlinux.o(.text+0xaf0b0): Section mismatch in reference from
the function kmemleak_no_scan() to the function .init.text:log_early()
The function kmemleak_no_scan() references
the function __init log_early().
This is often because kmemleak_no_scan lacks a __init
annotation or the annotation of log_early is wrong.

WARNING: vmlinux.o(.text+0xaf13e): Section mismatch in reference from
the function kmemleak_ignore() to the function .init.text:log_early()
The function kmemleak_ignore() references
the function __init log_early().
This is often because kmemleak_ignore lacks a __init
annotation or the annotation of log_early is wrong.

WARNING: vmlinux.o(.text+0xaf1ca): Section mismatch in reference from
the function kmemleak_not_leak() to the function
.init.text:log_early()
The function kmemleak_not_leak() references
the function __init log_early().
This is often because kmemleak_not_leak lacks a __init
annotation or the annotation of log_early is wrong.

WARNING: vmlinux.o(.text+0xafaba): Section mismatch in reference from
the function kmemleak_scan_area() to the function
.init.text:log_early()
The function kmemleak_scan_area() references
the function __init log_early().
This is often because kmemleak_scan_area lacks a __init
annotation or the annotation of log_early is wrong.

WARNING: vmlinux.o(.text+0xafd77): Section mismatch in reference from
the function kmemleak_alloc() to the function .init.text:log_early()
The function kmemleak_alloc() references
the function __init log_early().
This is often because kmemleak_alloc lacks a __init
annotation or the annotation of log_early is wrong.
--
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/