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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 02 Aug 2009 18:44:37 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Catalin Marinas <catalin.marinas@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Sukadev Bhattiprolu <sukadev@...ibm.com>,
	"Serge E. Hallyn" <serue@...ibm.com>
Subject: Re: Possible memory leak via alloc_pid()

Oleg Nesterov <oleg@...hat.com> writes:

> On 07/31, Catalin Marinas wrote:
>>
>> On Thu, 2009-07-30 at 23:29 +0200, Oleg Nesterov wrote:
>> >
>> > Since you can reproduce the problem easily, perhaps you can use the
>> > hack above to track get/put ?
>> >
>> > 	$ echo pid_of_Xorg > /proc/sys/kernel/xxx
>>
>> Below is the minicom capture. By the time Xorg dies, the count is 2.
>
> Thanks a lot Catalin.
>
>> When logging out, there are two counter incrementing events via
>> sys_wait4 and sys_ioctl, thoush I'm not sure whether they are
>> unbalanced.
>
> wait4() is right, ioctl() looks fine too.
>
>> pgrep Xorg
>> 1519
>> 10:~# pgrep Xorg > /proc/sys/kernel/xxx 
>> XXXXX(1519) ==22
>
> Unfortunately there is nothing which looks like a leak. I gueess it is
> too late to start the tracking.
>
> I'm afraid this won't really help too, but since nobody has a better
> idea for now, perhaps you can do another test?
>
> Pleas rename Xorg to Xorg.origin, and make a simple Xorg script which
> does something like
>
> 	#!/bin/sh
>
> 	echo $$ >> /proc/sys/kernel/xxx
> 	exec /path/to/Xorg.origin $*
>
> perhaps even this is too late, gdm can do a lot before execing.
>
> Please avoid pgrep/ps/etc, proc adds a lot of noise. Better yet, it
> would be nice to start/stop Xorg with /proc unmounted, but I don't
> know is this can work without /proc.

Hmm.  I'm starting to wonder if kmemleak is right.  I don't know how
it works but something about the way pids are used might be confusing it.

Eric
--
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