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:	Thu, 8 Dec 2011 20:50:40 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	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>,
	Vasiliy Kulikov <segoon@...nwall.com>,
	Andrew Vagin <avagin@...nvz.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs, proc: Introduce the /proc/<pid>/children entry v2

On Thu, Dec 08, 2011 at 05:35:35PM +0100, Oleg Nesterov wrote:
> >
> > Wait, Oleg, I might be wrong as well, but it's now a
> >
> > children_seq_open
> >  get_proc_task (so ref to task increased)
> 
> Yes. task_struct itself can't go away.
> 
> > the children_seq_start/children_seq_stop work
> > in iteration and every new iteration seq_list_next
> > walks over the whole children list from the list
> > head under rcu lock,
> 
> Yep, I misread this code, I though it does _next.
> 
> However, ->children list is not rcu-safe, this means that even
> list_for_each() itself is not safe. Either you need tasklist or
> we can probably make it rcu-safe...
> 

Seems I'll have to use tasklist_lock read-lock (atually it was
there in previous versions of patch but patch was not implementing
start/stop concept so I've been advised to use rcu read locks
instead).

> As for /proc/pid/children, personally I think it is very useful.
> But note that it obviously reports the children per-thread, while
> in general this is the per-process thing. Not sure this really

Yeah, Kosaki pointed me that I missed children from another threads.

> makes sense, but perhaps /proc/pid/children and
> /proc/pid/task/tid/children should act differently. Like, say,
> proc_tid_stat/proc_tgid_stat. I won't insist.
> 

At moment I thought only about top level here, ie /proc/pid/children,
but I think once I finish we can extend the patch ;)

Thanks for comments!

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