lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200902232159.DBJ26012.JHFSMVOOQtFFLO@I-love.SAKURA.ne.jp>
Date:	Mon, 23 Feb 2009 21:59:55 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	catalin.marinas@....com
Cc:	penberg@...helsinki.fi, linux-kernel@...r.kernel.org
Subject: Re: How to analyze kmemleak message?

Hello.

Catalin Marinas wrote:
> On Mon, 2009-02-23 at 20:29 +0900, Tetsuo Handa wrote:
> >   void *p1;
> >   
> >   void foo(void)
> >   {
> >       void *p2 = kmalloc(1, GFP_KERNEL);
> >       p1 = kmalloc(1, GFP_KERNEL);
> >   }
> > 
> > "p1" will be reported by default.
> 
> p1 won't be reported as a leak because it is a global variable and the
> data section is scanned.
> 
I see.

> > To report "p2", we need to write "stack=on" to /sys/kernel/debug/kmemleak .
> 
> It's the opposite - p2 will be reported as leak by default (stack=off)
> unless you enable the stack scanning (stack=on).
>
I see.

> I don't think you need to do anything here. Since p is a static local
> variable, isn't it placed in a data section somewhere (and automatically
> scanned by kmemleak)?
>
I see.

After all, I have nothing to modify for kmemleak. All I need to do is
"Just turn on kmemleak and see if functions in my module are reported or not".

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ