mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Rich Felker <dalias@libc.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	 linux-api@vger.kernel.org, libc-alpha@sourceware.org,
	 musl@lists.openwall.com
Subject: Re: [musl] AT_MINSIGSTKSZ mismatched interpretation kernel vs libc
Date: Mon, 02 Sep 2024 14:07:36 +0200	[thread overview]
Message-ID: <87v7zetg1j.fsf@oldenburg3.str.redhat.com> (raw)
In-Reply-To: <20240831154101.GN32249@brightrain.aerifal.cx> (Rich Felker's message of "Sat, 31 Aug 2024 11:41:02 -0400")

* Rich Felker:

> This is ambiguously worded (does "operating system" mean kernel?) and
> does not agree with POSIX, which defines it as:
>
>     Minimum stack size for a signal handler.
>
> And otherwise just specifies that sigaltstack shall fail if given a
> smaller size.
>
> The POSIX definition is also underspecified but it's clear that it
> should be possible to execute at least a do-nothing signal handler
> (like one which immediately returns and whose sole purpose is to
> induce EINTR when intalled without SA_RESTART), or even a minimal one
> that does something like storing to a global variable, with such a
> small stack. Allowing a size where even a do-nothing signal handler
> results in a memory-clobbering overflow or access fault seems
> non-conforming to me.

POSIX does not specify what happens on a stack overflow (or more
generally, if most resource limits are exceeded), so I think the
behavior is conforming on a technicality.

Thanks,
Florian


  reply	other threads:[~2024-09-02 12:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 20:54 Rich Felker
2024-08-31  9:29 ` Szabolcs Nagy
2024-08-31 15:02   ` Rich Felker
2024-08-31 15:09     ` H.J. Lu
2024-08-31 15:41       ` Rich Felker
2024-09-02 12:07         ` Florian Weimer [this message]
2024-09-02 12:51           ` 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=87v7zetg1j.fsf@oldenburg3.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=dalias@libc.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).