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]
Message-ID: <20120116162021.GH2998@moon>
Date:	Mon, 16 Jan 2012 20:20:21 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	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 Mon, Jan 16, 2012 at 05:11:14PM +0100, Oleg Nesterov wrote:
> On 01/16, Cyrill Gorcunov wrote:
> >
> > +get_children_pid(struct proc_pid_children_iter *iter, struct pid *pid_prev, loff_t pos)
> > +{
> > +	struct task_struct *start, *task;
> > +	struct pid *pid = NULL;
> > +
> > +	read_lock(&tasklist_lock);
> > +
> > +	start = pid_task(iter->pid_start, PIDTYPE_PID);
> > +	if (!start)
> > +		goto out;
> > +
> > +	/*
> > +	 * Lets try to continue searching first, this gives
> > +	 * us significant speedup on children-rich processes.
> > +	 */
> > +	if (pid_prev) {
> > +		task = pid_task(pid_prev, PIDTYPE_PID);
> > +		if (task && task->real_parent == start &&
> > +		    !(list_empty(&task->sibling))) {
> 
> Damn. No, this is wrong.
> 
> Damn! Yes, it was we who told you to check list_empty(sibling) ;)
> 
> But this is not enough. exit_ptrace() can do list_move() without
> changing ->real_parent.
> 
> I'll try to think. At first glance we can rely on EXIT_DEAD, but
> I'd like to avoid this, I think EXIT_DEAD should die.
> 

Ouch! Thanks for catching this Oleg. I'll try to come with something
to show as well.

	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