From: Bruno Haible <bruno@clisp.org>
To: Eric Blake <eblake@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
libc-alpha@sourceware.org, Carol Bouchard <cbouchar@redhat.com>,
"austin-group-l@opengroup.org" <austin-group-l@opengroup.org>,
bug-m4@gnu.org
Subject: Re: SIGSTKSZ is now a run-time variable
Date: Tue, 09 Mar 2021 20:58:38 +0100 [thread overview]
Message-ID: <13030663.F5dv5Vxd0a@omega> (raw)
In-Reply-To: <d84de10b-c528-19f7-353a-397cfedeeb2c@redhat.com>
Eric Blake wrote:
> I can open a defect against POSIX if we decide that is needed, but want
> some consensus first on whether it is glibc's change that went too far,
> or POSIX's requirements that are too restrictive for what glibc wants to do.
Thanks for opening the discussion, Eric.
Here are a couple of questions, to understand the motivation and the possible
alternative solutions to the problem:
1) As far as I understand, the issue occurs with certain x86 or x86_64
processors.
1.1) What has been the value of MINSIGSTKSZ on x86 and x86_64 so far?
1.2) What value of MINSIGSTKSZ is needed for AVX-512F support?
1.3) Will the trend to larger MINSIGSTKSZ values continue for Intel
processors?
2) Regarding the change of the macro MINSIGSTKSZ:
Would it possible to just change the value of MINSIGSTKSZ to a larger
constant?
If there is a fear regarding ABI compatibility between a library and a
program: How likely is it that a library offers an interface that takes
a char[MINSIGSTKSZ] as argument, or that defines a variable of type
char[MINSIGSTKSZ]?
3) Regarding the change of the macro SIGSTKSZ:
Likewise, would it be possible to just change the value of SIGSTKSZ to a
larger constant?
4) Since SIGSTKSZ has other uses than MINSIGSTKSZ, has it been considered
to make MINSIGSTKSZ non-constant but keep SIGSTKSZ constant?
5) POSIX:2018 [1] defines SIGSTKSZ as the stack size for "the usual case".
So, it should be composed of MINSIGSTKSZ for the initial stack frame,
plus a certain amount of stack, depending on CPU, ABI, and compiler,
for doing what a "usual" signal handler would do.
What is the reason, then, for the computation
SIGSTKSZ >= 4 * MINSIGSTKSZ
in [2]? Shouldn't it be something like
SIGSTKSZ >= MINSIGSTKSZ + (64 KB on SPARC and powerpc, 8 KB on other
processors)
?
Bruno
[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaltstack.html
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sysconf-sigstksz.h
next prev parent reply other threads:[~2021-03-09 19:58 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 [this message]
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
[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=13030663.F5dv5Vxd0a@omega \
--to=bruno@clisp.org \
--cc=austin-group-l@opengroup.org \
--cc=bug-m4@gnu.org \
--cc=cbouchar@redhat.com \
--cc=eblake@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@linux-m68k.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).