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, 26 May 2011 17:01:50 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Denys Vlasenko <vda.linux@...glemail.com>,
	jan.kratochvil@...hat.com, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	indan@....nu, bdonlan@...il.com
Subject: Re: [PATCH 03/10] ptrace: implement PTRACE_SEIZE

On 05/26, Tejun Heo wrote:
>
> Hello,
>
> On Wed, May 25, 2011 at 08:29:19PM +0200, Oleg Nesterov wrote:
> > > > And. Currently there is no way to detach a zombie leader. Perhaps we
> > > > should change do_wait(), but it is not clear what should we do if the
> > > > tracer is the real parent (we already discussed this a bit).
> > >
> > > Hmmm... maybe just allow detaching zombie leader?
> >
> > Yes, I think we should do this.
> >
> > If we change PTRACE_DETACH (or add the new request) to allow this, then
> > I think it it should detach any zombie, leader or not.
>
> I think we can just make PTRACE_DETACH to succeed for zombies.  No
> reason to add a new request for this.

OK.

> > Or we can change do_wait() to detach a zombie leader. In this case it
> > is not clear what should we do if the debugger is the real parent.
> > Perhaps do_wait() should do the same: detach a leader (but not reap).
> > When the last thread does, the real parent will be notified again.
> > IOW, wait(tgid) can succeed twice.
>
> Just letting PTRACE_DETACH work for zombies sounds much simpler to me.

Probably, but please note we have to modify do_wait() anyway. Otherwise
in general the tracer simply can not know the tracee has exited. IOW,
waitpid(zombie_leader_pid, WEXITED) should succeed without reaping if
delay_group_leader(), then the tracer can do PTRACE_DETACH. But this is
not symmetrical with sub-thread zombies.

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