This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][AARCH64][BZ #16850]Increase MINSIGSTKSZ & SIGSTKSZ
- From: Catalin Marinas <catalin dot marinas at arm dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Renlin Li <Renlin dot Li at arm dot com>, Arnd Bergmann <arnd at arndb dot de>
- Date: Wed, 19 Nov 2014 16:57:48 +0000
- Subject: Re: [PATCH][AARCH64][BZ #16850]Increase MINSIGSTKSZ & SIGSTKSZ
- Authentication-results: sourceware.org; auth=none
- References: <5465D638 dot 2070403 at arm dot com> <CAFqB+PyMdPP-kWyRHhEs9wGx_cmhHJCHYYe=XUKcnrQUSRM6eg at mail dot gmail dot com>
(cc'ing Arnd)
On Wed, Nov 19, 2014 at 04:42:59PM +0000, Marcus Shawcroft wrote:
> On 14 November 2014 10:15, Renlin Li <renlin.li@arm.com> wrote:
> > This patch duplicates sysdeps/unix/sysv/linux/bits/sigstack.h into
> > sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h and modifies only SIGSTCKSZ
> > and MINSIGSTKSZ.
> >
> > The ucontext_t is 4560 bytes, siginfo_t is 128 bytes. The required sigframe
> > is far larger than the current default MINSIGSTKSZ (which is 2048). Thus, I
> > increase MINSIGSTKSZ to 8192, and adjust SIGSTCKSZ accordingly.
> >
> > Glibc has been build and test on the model, no new issues.
> >
> > Okay to commit?
> >
> > ChangeLog:
> >
> > 2014-11-14 Renlin Li <Renlin.Li@arm.com>
> > [BZ #16850]
> > * sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h: New.
>
> Catalin, We need to lift raise the values of MINSIGSTKSZ and
> SIGSTCKSZ the former is currently smaller than a signal frame which
> makes it unusable. These are defined in both glibc and in the kernel
> but should be kept in sync. The proposal in glibc is to lift these to
> 8192 and 18384 respectively. Thoughts?
The arm64 port uses the generic values but they could be defined,
probably with some #ifdef in the generic signal.h file.
There is however a slight ABI change as the do_sigaltstack() Linux
implementation checks whether the user ss_size is smaller than
MINSIGSTKSZ and exits. If we assume that the user code with a 2KB/4KB
ss_size for sigaltstack was already broken, we can make this change. But
I'd like to see Arnd's opinion as well.
Thanks.
--
Catalin