mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: abort() fails to terminate PID 1 process
Date: Mon, 4 Jul 2016 23:07:38 -0400	[thread overview]
Message-ID: <20160705030738.GS15995@brightrain.aerifal.cx> (raw)
In-Reply-To: <alpine.LRH.2.20.1607041531310.30017@s1.palsenberg.com>

On Mon, Jul 04, 2016 at 03:37:35PM +0200, Igmar Palsenberg 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.
> > 
> > A vague "pid 1 is special" rule (which the standard does not support
> > except in a few very specific places where an implementation-defined
> > set of processes are permitted to be treated in specific special ways)
> > does not imply "calling a function whose behavior is well-defined can
> > legitimately lead to runaway code execution if the pid is 1".
> 
> But doesn't "bevavior is well-defined" also imply that that function 
> behaves as it should ? If it doesn't, doesn't the "well-defined" no longer 
> apply ? I call it UB in this case.

"Behavior is well-defined" means the specification tells what it does
and does not leave it implementation-defined, unspecified, or
undefined -- neither by explicitly saying so, nor by omission.

> The standard also says a process can't ignore a SIGKILL, but on pid 1, it 
> has no effect. I pretty much call that UB myself.

You keep using that word. I do not think it means what you think it
means.

If anything what you're arguing is that the Linux kernel has a bug,
since the behavior of raising SIGKILL is specified and Linux does not
do what the spec says (for pid 1). That does not mean it's undefined
but rather that the implementation is behaving contrary to the defined
behavior.

Rich


  reply	other threads:[~2016-07-05  3:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18 20:32 Karl Böhlmark
2016-06-19  1:20 ` nathan
2016-06-20  9:02 ` Igmar Palsenberg
2016-06-20 10:04   ` Szabolcs Nagy
2016-06-20 12:00     ` Igmar Palsenberg
2016-06-20 19:41       ` Rich Felker
2016-07-03 10:43         ` Igmar Palsenberg
2016-07-03 13:58           ` Rich Felker
2016-07-03 19:58             ` Laurent Bercot
2016-07-03 20:01               ` Rich Felker
2016-07-03 20:20                 ` Laurent Bercot
2016-07-03 20:24                   ` Rich Felker
2016-07-04 13:38               ` Igmar Palsenberg
2016-07-04 13:37             ` Igmar Palsenberg
2016-07-05  3:07               ` Rich Felker [this message]
2016-07-30 21:24                 ` Igmar Palsenberg
2016-06-20 10:29 ` Natanael Copa
2016-07-03 22:03 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160705030738.GS15995@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).