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] [day] [month] [year] [list]
Message-ID: <20080307023938.GB149@tv-sign.ru>
Date:	Fri, 7 Mar 2008 05:39:38 +0300
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Roland McGrath <roland@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Ingo Molnar <mingo@...e.hu>, Jiri Kosina <jkosina@...e.cz>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Pavel Emelyanov <xemul@...nvz.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC,PATCH 1/2] signals: re-assign CLD_CONTINUED notification from the sender to reciever

On 03/06, Roland McGrath wrote:
>
> I like this version fine, but I would like to see that comment in
> get_signal_to_deliver added in a cleanup patch.

Yes. Will do.

>From another message:
>
> > Perhaps, we can add the new helper which sets SIGNAL_GROUP_EXIT but preserves
> > SIGNAL_CLD_MASK, but I don't think this is really needed.
>
> Actually, I think it is.  This made think of another pedantic concern.
> (Not that I'm sure we get this right now anyway.)

This "I don't think this is really needed" above meant that the patch doesn't
make things worse than we currently have, but

> Say a child was previously stopped, parent had seen CLD_STOPPED and done
> WSTOPPED wait.  Now we send SIGCONT followed shortly by SIGTERM (unhandled
> fatal signal).  In the interval before the SIGTERM has yet been dequeued
> (nor SIGKILLs sent to other threads by __group_complete_signal), the parent
> does waitpid(pid, WSTOPPED|WCONTINUED|WEXITED|WNOHANG).  It should see one
> of: WIFSTOPPED (still); WIFSIGNALED (dead); WIFCONTINUED.  Instead, waitpid
> will return 0 (it's running, not stopped, not continued).  This says
> SIGNAL_STOP_CONTINUED ought to function as normal (i.e. WCONTINUED polling)
> until we're actually ready for wait to report the process as dead.

Good point, completely agreed. (except I think it doesn't matter was that
fatal signal dequeued or not).

> We already break this pedantic nit because flags = SIGNAL_GROUP_EXIT clears
> SIGNAL_STOP_CONTINUED.  But if we clean up all flags usage, I think we
> should make it preserve SIGNAL_STOP_CONTINUED.
>
> But if we were to make wait key on SIGNAL_STOP_STOPPED, as is
> probably necessary to do WSTOPPED waits for processes with a zombie
> group_leader, then this too could be made consistent.  (Leave the
> SIGNAL_STOP_STOPPED bit set throughout, so WSTOPPED|WNOHANG waits continues
> to report it as stopped until it actually dies.)

Yes, thanks. Will try to do a bit later.

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