[PATCH] powerpc64: Increase SIGSTKSZ and MINSIGSTKSZ

Rajalakshmi Srinivasaraghavan rajis@linux.vnet.ibm.com
Tue Dec 13 13:41:59 GMT 2022


On 12/12/22 9:27 PM, Adhemerval Zanella Netto via Libc-alpha wrote:
>
> On 12/12/22 20:31, Paul E Murphy via Libc-alpha wrote:
>> On 12/8/22 7:16 PM, Rajalakshmi Srinivasaraghavan via Libc-alpha wrote:
>>> This patch increases the value of SIGSTKSZ and MINSIGSTKSZ
>>> for powerpc64 similar to the kernel commit
>>> 2f82ec19757f58549467db568c56e7dfff8af283 to allow
>>> further expansion of the signal stack frame size.
>> This LGTM. The kernel's commit message is a little confusing to someone who didn't experience the original issue, but make sense once looking through the tree of referenced commits.
> Shouldn't powerpc follow x86 to use sysconf (_SC_SIGSTKSZ) as well?
> Or this is done unconditionally on kernel without it providing a
> AT_MINSIGSTKSZ?


Yes, We have that in the plan after merging this.  There is a kernel commit
2896b2dff49d0377e4372f470dcddbcb26f2be59 which allows userspace
to fetch AT_MINSIGSTKSZ AUXV entry for powerpc.


>
>>> ---
>>>    sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h | 5 +++++
>>>    1 file changed, 5 insertions(+)
>>>
>>> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
>>> index abc87cd7a6..4bff1fe1e7 100644
>>> --- a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
>>> +++ b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
>>> @@ -23,10 +23,15 @@
>>>    # error "Never include this file directly.  Use <signal.h> instead"
>>>    #endif
>>>
>>> +#ifdef __powerpc64__
>>> +#define MINSIGSTKSZ    8192
>>> +#define SIGSTKSZ    32768
>>> +#else
>>>    /* Minimum stack size for a signal handler.  */
>>>    #define MINSIGSTKSZ    4096
>>>
>>>    /* System default stack size.  */
>>>    #define SIGSTKSZ    16384
>>> +#endif
>>>
>>>    #endif /* bits/sigstack.h */


More information about the Libc-alpha mailing list