public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small
@ 2014-04-17  8:56 michael.hudson at linaro dot org
  2014-04-23 20:06 ` [Bug libc/16850] " michael.hudson at linaro dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: michael.hudson at linaro dot org @ 2014-04-17  8:56 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

            Bug ID: 16850
           Summary: [aarch64] MINSIGSTKSZ is (much) too small
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: michael.hudson at linaro dot org
                CC: drepper.fsp at gmail dot com

MINSIGSTKSZ is only 2048 but when you as SA_SIGINFO, the kernel pushes (IIRC)
4704 bytes onto the stack.  Which is more than 2048:

ubuntu@ms01a:~/mwhudson$ cat u.c 
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <stdio.h>

char* buf;

void handler(int signo, siginfo_t *info, void *context)
{
//    char i;
//    printf("hi %p %ld\n", &i, &i - buf);
    return;
}

int main (int argc, char** argv)
{
    stack_t ss;
    int i;
    struct sigaction sa;

    buf = malloc(5*MINSIGSTKSZ);
    if (!buf) abort();

    memset(buf, 0, 5*MINSIGSTKSZ);

    ss.ss_sp = buf + 2*MINSIGSTKSZ;
    ss.ss_size = MINSIGSTKSZ;
    ss.ss_flags = 0;
    if (sigaltstack(&ss, NULL) == -1)
        abort();

    sa.sa_sigaction = handler;
    sa.sa_flags = SA_SIGINFO|SA_ONSTACK;
    sigemptyset(&sa.sa_mask);
    sigaction(SIGHUP, &sa, NULL);

    kill(getpid(), SIGHUP);

    for (i = 0; i < 2*MINSIGSTKSZ; i++) {
        if (buf[i]) printf("%d\n", i);    
    }

    for (i = 3*MINSIGSTKSZ; i < 5*MINSIGSTKSZ; i++) {
        if (buf[i]) printf("%d\n", i);    
    }

}
ubuntu@ms01a:~/mwhudson$ gcc u.c -o u && ./u
1416
1417
1418
1419
1424
1425
1426
....

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
@ 2014-04-23 20:06 ` michael.hudson at linaro dot org
  2014-06-12 19:41 ` fweimer at redhat dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: michael.hudson at linaro dot org @ 2014-04-23 20:06 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Michael Hudson-Doyle <michael.hudson at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.hudson at linaro dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
  2014-04-23 20:06 ` [Bug libc/16850] " michael.hudson at linaro dot org
@ 2014-06-12 19:41 ` fweimer at redhat dot com
  2014-06-26 13:50 ` fweimer at redhat dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: fweimer at redhat dot com @ 2014-06-12 19:41 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
  2014-04-23 20:06 ` [Bug libc/16850] " michael.hudson at linaro dot org
  2014-06-12 19:41 ` fweimer at redhat dot com
@ 2014-06-26 13:50 ` fweimer at redhat dot com
  2014-09-27 12:53 ` schwab@linux-m68k.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: fweimer at redhat dot com @ 2014-06-26 13:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (2 preceding siblings ...)
  2014-06-26 13:50 ` fweimer at redhat dot com
@ 2014-09-27 12:53 ` schwab@linux-m68k.org
  2014-09-27 14:41 ` schwab@linux-m68k.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2014-09-27 12:53 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcus.shawcroft at arm dot com

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
Even SIGSTKSZ is very tight, it can barely handle a single signal frame.  Sparc
is using 4096/16384, which would be much more reasonable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (3 preceding siblings ...)
  2014-09-27 12:53 ` schwab@linux-m68k.org
@ 2014-09-27 14:41 ` schwab@linux-m68k.org
  2014-09-28 11:47 ` schwab@linux-m68k.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2014-09-27 14:41 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
Of course, 4096 is still too small.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (4 preceding siblings ...)
  2014-09-27 14:41 ` schwab@linux-m68k.org
@ 2014-09-28 11:47 ` schwab@linux-m68k.org
  2014-11-05 10:54 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2014-09-28 11:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
This is causing a python3 test to fail.

http://bugs.python.org/issue22503

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (5 preceding siblings ...)
  2014-09-28 11:47 ` schwab@linux-m68k.org
@ 2014-11-05 10:54 ` schwab@linux-m68k.org
  2014-11-05 10:57 ` marcus.shawcroft at gmail dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2014-11-05 10:54 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcus.shawcroft at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (6 preceding siblings ...)
  2014-11-05 10:54 ` schwab@linux-m68k.org
@ 2014-11-05 10:57 ` marcus.shawcroft at gmail dot com
  2014-11-10 11:25 ` renlin.li at arm dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marcus.shawcroft at gmail dot com @ 2014-11-05 10:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Marcus Shawcroft <marcus.shawcroft at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |marcus.shawcroft at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (7 preceding siblings ...)
  2014-11-05 10:57 ` marcus.shawcroft at gmail dot com
@ 2014-11-10 11:25 ` renlin.li at arm dot com
  2014-11-10 11:49 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: renlin.li at arm dot com @ 2014-11-10 11:25 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Renlin Li <renlin.li at arm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |renlin.li at arm dot com

--- Comment #4 from Renlin Li <renlin.li at arm dot com> ---
I am working on this

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (8 preceding siblings ...)
  2014-11-10 11:25 ` renlin.li at arm dot com
@ 2014-11-10 11:49 ` fweimer at redhat dot com
  2015-04-02 10:19 ` cvs-commit at gcc dot gnu.org
  2015-04-02 10:23 ` schwab@linux-m68k.org
  11 siblings, 0 replies; 13+ messages in thread
From: fweimer at redhat dot com @ 2014-11-10 11:49 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|fweimer at redhat dot com          |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (9 preceding siblings ...)
  2014-11-10 11:49 ` fweimer at redhat dot com
@ 2015-04-02 10:19 ` cvs-commit at gcc dot gnu.org
  2015-04-02 10:23 ` schwab@linux-m68k.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-04-02 10:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b763f6ae859ecea70a5dacb8ad45c71d5f667e2e (commit)
      from  c26efef9798914e208329c0e8c3c73bb1135d9e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b763f6ae859ecea70a5dacb8ad45c71d5f667e2e

commit b763f6ae859ecea70a5dacb8ad45c71d5f667e2e
Author: Andreas Schwab <schwab@suse.de>
Date:   Tue Sep 30 12:41:11 2014 +0200

    aarch64: Increase MINSIGSTKSZ and SIGSTKSZ (bug 16850)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    5 +++++
 NEWS                                               |   12 ++++++------
 .../linux/{powerpc => aarch64}/bits/sigstack.h     |    4 ++--
 3 files changed, 13 insertions(+), 8 deletions(-)
 copy sysdeps/unix/sysv/linux/{powerpc => aarch64}/bits/sigstack.h (94%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/16850] [aarch64] MINSIGSTKSZ is (much) too small
  2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
                   ` (10 preceding siblings ...)
  2015-04-02 10:19 ` cvs-commit at gcc dot gnu.org
@ 2015-04-02 10:23 ` schwab@linux-m68k.org
  11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2015-04-02 10:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16850

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.22

--- Comment #6 from Andreas Schwab <schwab@linux-m68k.org> ---
Fixed in 2.22.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-04-02 10:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-17  8:56 [Bug libc/16850] New: [aarch64] MINSIGSTKSZ is (much) too small michael.hudson at linaro dot org
2014-04-23 20:06 ` [Bug libc/16850] " michael.hudson at linaro dot org
2014-06-12 19:41 ` fweimer at redhat dot com
2014-06-26 13:50 ` fweimer at redhat dot com
2014-09-27 12:53 ` schwab@linux-m68k.org
2014-09-27 14:41 ` schwab@linux-m68k.org
2014-09-28 11:47 ` schwab@linux-m68k.org
2014-11-05 10:54 ` schwab@linux-m68k.org
2014-11-05 10:57 ` marcus.shawcroft at gmail dot com
2014-11-10 11:25 ` renlin.li at arm dot com
2014-11-10 11:49 ` fweimer at redhat dot com
2015-04-02 10:19 ` cvs-commit at gcc dot gnu.org
2015-04-02 10:23 ` schwab@linux-m68k.org

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).