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:	Wed, 18 Jan 2012 14:58:09 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...il.com>
Cc:	Cyrill Gorcunov <gorcunov@...nvz.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pavel Emelyanov <xemul@...allels.com>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Tejun Heo <tj@...nel.org>, Andrew Vagin <avagin@...nvz.org>,
	Vasiliy Kulikov <segoon@...nwall.com>
Subject: Re: [RFC] fs, proc: Introduce /proc/<pid>/task/<tid>/children
	entry v6

On 01/17, KOSAKI Motohiro wrote:
>
> (1/16/12 10:32 AM), Cyrill Gorcunov wrote:
>> When we do checkpoint of a task we need to know the list of children
>> the task, has but there is no easy and fast way to generate reverse
>> parent->children chain from arbitrary<pid>  (while a parent pid is
>> provided in "PPid" field of /proc/<pid>/status).
>>
>> So instead of walking over all pids in the system (creating one big process
>> tree in memory, just to figure out which children a task has) -- we add
>> explicit /proc/<pid>/task/<tid>/children entry, because the kernel already has
>> this kind of information but it is not yet exported.
>
> I doubt this is good idea. It move some complexity to userland, but not reduce.
> Again, if we add this interface, it should help pstree like process traversal
> tools. Bare task hierarchy shouldn't be exposed userland. I believe users need
> sub process, not sub threads.

IOW, you mean that the reading from 'children' should list all children
of the whole thread group. Yes, we discussed this before a bit.

In this case this file should live in /proc/pid/, not in /proc/pid/task/tid.
But this doesn't allow to restore the hierarchy correctly, you need to know
the parent thread. So I think /proc/pid/tasks/tid/children is still needed.
And I think it does help pstree-like apps, just they need to look into task/.

As for /proc/pid/children, may be we can add it later. But this is not that
simple. The problem is the threaded reparenting, we do not want to list the
same child twice.

Oleg.

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