Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode need to sigaltstack for each lwp



details:   https://anonhg.NetBSD.org/src/rev/9190f9b43d8f
branches:  trunk
changeset: 772022:9190f9b43d8f
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Dec 14 04:12:22 2011 +0000

description:
need to sigaltstack for each lwp

diffstat:

 sys/arch/usermode/dev/cpu.c         |   5 +++--
 sys/arch/usermode/include/machdep.h |   4 +++-
 sys/arch/usermode/usermode/trap.c   |  10 +++++++---
 3 files changed, 13 insertions(+), 6 deletions(-)

diffs (69 lines):

diff -r ca38380c49d5 -r 9190f9b43d8f sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Tue Dec 13 22:22:08 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Wed Dec 14 04:12:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.50 2011/12/13 12:25:42 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.51 2011/12/14 04:12:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_hz.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.50 2011/12/13 12:25:42 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.51 2011/12/14 04:12:22 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -302,6 +302,7 @@
 
        /* actual jump */
        thunk_makecontext(ucp, (void (*)(void)) func, 1, arg, NULL, NULL);
+       thunk_sigaltstack(usermode_signal_stack(), NULL);
        thunk_setcontext(ucp);
 }
 
diff -r ca38380c49d5 -r 9190f9b43d8f sys/arch/usermode/include/machdep.h
--- a/sys/arch/usermode/include/machdep.h       Tue Dec 13 22:22:08 2011 +0000
+++ b/sys/arch/usermode/include/machdep.h       Wed Dec 14 04:12:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.h,v 1.4 2011/11/27 21:38:17 reinoud Exp $ */
+/* $NetBSD: machdep.h,v 1.5 2011/12/14 04:12:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -40,3 +40,5 @@
 void   syscall(void);
 void   pagefault(void);
 
+/* signal stack */
+stack_t *usermode_signal_stack(void);
diff -r ca38380c49d5 -r 9190f9b43d8f sys/arch/usermode/usermode/trap.c
--- a/sys/arch/usermode/usermode/trap.c Tue Dec 13 22:22:08 2011 +0000
+++ b/sys/arch/usermode/usermode/trap.c Wed Dec 14 04:12:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.43 2011/12/13 17:54:01 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.44 2011/12/14 04:12:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.43 2011/12/13 17:54:01 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.44 2011/12/14 04:12:22 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -313,4 +313,8 @@
        pcb->pcb_errno = lwp_errno;
 }
 
-
+stack_t *
+usermode_signal_stack(void)
+{
+       return &sigstk;
+}



Home | Main Index | Thread Index | Old Index