Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/amd64 Don't reserve space (128) on signal sta...



details:   https://anonhg.NetBSD.org/src/rev/94569053bd55
branches:  trunk
changeset: 329157:94569053bd55
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Mon May 12 13:49:24 2014 +0000

description:
Don't reserve space (128) on signal stack for unknown reasons; the actual
space for struct sigframe_siginfo (+ alignment) is allocated just below.

Confirmed by the following tests:

        tests/lib/libc/gen/t_siginfo
        tests/lib/libc/sys/t_sigtimedwait
        tests/lib/libc/sys/t_sigaction
        tests/lib/libc/sys/t_sigqueue

diffstat:

 sys/arch/amd64/amd64/machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 04d4fe38622f -r 94569053bd55 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Mon May 12 11:56:02 2014 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Mon May 12 13:49:24 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.208 2014/05/12 09:01:34 uebayasi Exp $   */
+/*     $NetBSD: machdep.c,v 1.209 2014/05/12 13:49:24 uebayasi Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.208 2014/05/12 09:01:34 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.209 2014/05/12 13:49:24 uebayasi Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -563,7 +563,7 @@
        if (onstack)
                sp = ((char *)l->l_sigstk.ss_sp + l->l_sigstk.ss_size);
        else
-               sp = (char *)tf->tf_rsp - 128;
+               sp = (char *)tf->tf_rsp;
 
        sp -= sizeof(struct sigframe_siginfo);
        /* Round down the stackpointer to a multiple of 16 for the ABI. */



Home | Main Index | Thread Index | Old Index