[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIGSTKSZ is now a run-time variable
From: |
Bruno Haible |
Subject: |
Re: SIGSTKSZ is now a run-time variable |
Date: |
Tue, 09 Mar 2021 20:58:38 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; ) |
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
- SIGSTKSZ is now a run-time variable, Carol Bouchard, 2021/03/04
- Re: SIGSTKSZ is now a run-time variable, Bruno Haible, 2021/03/06
- Re: SIGSTKSZ is now a run-time variable, Carol Bouchard, 2021/03/08
- Re: SIGSTKSZ is now a run-time variable, Eric Blake, 2021/03/09
- Re: SIGSTKSZ is now a run-time variable, Andreas Schwab, 2021/03/09
- Re: SIGSTKSZ is now a run-time variable, Eric Blake, 2021/03/09
- Re: SIGSTKSZ is now a run-time variable,
Bruno Haible <=
- Re: SIGSTKSZ is now a run-time variable, H.J. Lu, 2021/03/09
- Re: SIGSTKSZ is now a run-time variable, Scott Lurndal, 2021/03/09
- Re: SIGSTKSZ is now a run-time variable, Carol Bouchard, 2021/03/16
- Re: SIGSTKSZ is now a run-time variable, Carol Bouchard, 2021/03/26
- Re: SIGSTKSZ is now a run-time variable, Zack Weinberg, 2021/03/09
Re: SIGSTKSZ is now a run-time variable, Eric Blake, 2021/03/09
Re: SIGSTKSZ is now a run-time variable, shwaresyst, 2021/03/09