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, 23 Jun 2011 11:24:01 +0200
From:	Tejun Heo <tj@...nel.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	torvalds@...ux-foundation.org, hch@...radead.org
Subject: Re: [PATCH 6/7] ptrace: kill detah tracehooks

Hey, Oleg.

On Mon, Jun 20, 2011 at 09:39:29PM +0200, Oleg Nesterov wrote:
> > -	signal = tracehook_notify_death(tsk, &cookie, group_dead);
> > -	if (signal >= 0)
> > -		signal = do_notify_parent(tsk, signal);
> > +	/*
> > +	 * Notify interested parent if the whole group is dead.  Ptracer
> > +	 * should always be notified.  If something other than our normal
> > +	 * parent is ptracing us, then send it a SIGCHLD instead of
> > +	 * honoring exit_signal.  exit_signal only has special meaning to
> > +	 * our real parent.
> > +	 */
> > +	if (!task_detached(tsk) && thread_group_empty(tsk)) {
> > +		if (!ptrace_reparented(tsk))
> > +			do_notify_parent(tsk, tsk->exit_signal);
> > +		else
> > +			do_notify_parent(tsk, SIGCHLD);
> 
> Forget about ptrace, suppose a single threaded child exits and its
> parent ignores SIGCHLD. In this case do_notify_parent() sets
> exit_signal = -1 to mark it dead, we should set exit_state = EXIT_DEAD
> and release it.

Oops, right.  Missed do_notify_parent() may modify exit_signal.
Grumble.  It seems you already have posted patches to address this
one.  Let's continue there.

Thanks.

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