public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zackw@panix.com>
To: glibc list <libc-alpha@sourceware.org>,
	"H.J. Lu" <hjl.tools@gmail.com>,
	 Florian Weimer <fweimer@redhat.com>
Cc: Bruno Haible <bruno@clisp.org>,
	Carol Bouchard <cbouchar@redhat.com>,
	bug-m4@gnu.org, Eric Blake <eblake@redhat.com>,
	 "austin-group-l@opengroup.org" <austin-group-l@opengroup.org>
Subject: Re: SIGSTKSZ is now a run-time variable
Date: Tue, 9 Mar 2021 10:46:20 -0500	[thread overview]
Message-ID: <CAKCAbMgknUp0eKDBn1S9t=zZZ9u68dq7TdsF1wr=r=rkrc_tjQ@mail.gmail.com> (raw)
In-Reply-To: <6ea9c6e1-40dc-19c9-397d-0d812903bd7e@redhat.com>

On Tue, Mar 9, 2021 at 10:23 AM Eric Blake via Libc-alpha
<libc-alpha@sourceware.org> wrote:
> [adding glibc and Austin group lists]
> On 3/6/21 12:50 PM, Bruno Haible wrote:
> > Besides being invalid, it is also not needed. The alternate signal stack
> > needs to be dimensioned according to the CPU and ABI that is in use. For example,
> > SPARC processors tend to use much more stack space than x86 per function
> > invocation. Similarly, 64-bit execution on a bi-arch CPU tends to use more stack
> > space than 32-bit execution, because return addresses and other pointers are
> > 64-bit vs. 32-bit large. But once you have fixed the CPU and the ABI, there is
> > no ambiguity any more.

The rationale for this change, from the glibc side, is that various
CPU architectures (notably x86 and ARM, as I understand it) have been
adding extensions that break the above premises.  The amount of space
required by the ucontext_t object (third argument to a SA_SIGINFO
signal handler) depends not only on the ISA and ABI but on the exact
set of ISA extensions that are available on the model of CPU that
happens to be running the program today.  Moreover, some of these
extensions require a great deal of space to store e.g. large SIMD
vector registers -- more than will fit in the fairly small MINSIGSTKSZ
we've historically provided (usually something like 2048 bytes).  And
there isn't anywhere else we / the kernel can save this state.

I was worried about exactly this kind of breakage when the patches
were originally being discussed, but _something_ has to give here and
I don't know what else it could be.   cc:ing H.J. and Florian, who
were more deeply involved.

zw

  parent reply	other threads:[~2021-03-09 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1841269.IEpri3ZHvQ@omega>
2021-03-09 15:23 ` Eric Blake
2021-03-09 15:26   ` Andreas Schwab
2021-03-09 15:48     ` Eric Blake
2021-03-09 19:58       ` Bruno Haible
2021-03-09 21:05         ` H.J. Lu
     [not found]         ` <20210309211735.GW19922@dragon.sl.home>
2021-03-16 19:46           ` Carol Bouchard
2021-03-26 12:46             ` Carol Bouchard
2021-03-09 15:46   ` Zack Weinberg [this message]
     [not found] <832918739.1734727.1615306471320.ref@mail.yahoo.com>
2021-03-09 16:14 ` shwaresyst
2021-03-09 19:33   ` Paul Eggert
2021-03-09 19:34   ` Eric Blake
2021-03-09 20:12     ` Eric Blake
     [not found] <1569476484.1894162.1615325397167.ref@mail.yahoo.com>
2021-03-09 21:29 ` shwaresyst
2021-03-09 23:58   ` H.J. Lu

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='CAKCAbMgknUp0eKDBn1S9t=zZZ9u68dq7TdsF1wr=r=rkrc_tjQ@mail.gmail.com' \
    --to=zackw@panix.com \
    --cc=austin-group-l@opengroup.org \
    --cc=bruno@clisp.org \
    --cc=bug-m4@gnu.org \
    --cc=cbouchar@redhat.com \
    --cc=eblake@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).