From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10278 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: abort() fails to terminate PID 1 process Date: Sun, 3 Jul 2016 16:01:25 -0400 Message-ID: <20160703200125.GJ15995@brightrain.aerifal.cx> References: <20160620100443.GV22574@port70.net> <20160620194110.GM10893@brightrain.aerifal.cx> <20160703135846.GF15995@brightrain.aerifal.cx> <82c4150b-3433-4e3f-2304-9aceef82a54b@skarnet.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467576103 19526 80.91.229.3 (3 Jul 2016 20:01:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2016 20:01:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10291-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jul 03 22:01:42 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bJnaH-00029M-Sq for gllmg-musl@m.gmane.org; Sun, 03 Jul 2016 22:01:42 +0200 Original-Received: (qmail 9530 invoked by uid 550); 3 Jul 2016 20:01:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 9512 invoked from network); 3 Jul 2016 20:01:38 -0000 Content-Disposition: inline In-Reply-To: <82c4150b-3433-4e3f-2304-9aceef82a54b@skarnet.org> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10278 Archived-At: On Sun, Jul 03, 2016 at 09:58:45PM +0200, Laurent Bercot wrote: > On 03/07/2016 15:58, Rich Felker wrote: > >Whether you realize it or not, what you're saying is equivalent to > >saying that it's UB for a process that runs as pid 1 to call abort(). > >There is no basis for such a claim. > > There's no basis in the specification, but in practice, on Linux at least, > a process that runs as pid 1 outside of a container and that exits - whether > normally or via abort() or anything else - will cause a kernel panic. So > treating that case as UB is defensible, at least until musl is ported to an > OS where pid 1 death is less dramatic. No. Halting the system safely (which kernel panic does) is completely different from runaway wrong-code execution, and the only reason we don't have runaway wrong-code execution right now is because I built in the for(;;) safety in case termination failed. Rich