diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-12-02 07:03:33 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-12-02 07:03:33 +0000 |
commit | 15c7623306062239f832ef81bd0bdfc804b4d186 (patch) | |
tree | d4c341f7fa4f162d4c4cd1ede1db5c9089f0afb6 /sys/arch/powerpc | |
parent | b02dfe0ab7aae6700f0c15419373891118eab134 (diff) |
Determine whether we're currently on the alternative signal stack
dynamically, by comparing the stack pointer against the altstack
base and size, so that you get the correct answer if you longjmp
out of the signal handler, as tested by regress/sys/kern/stackjmp/.
Also, fix alt stack handling on vax, where it was completely broken.
Testing and corrections by miod@, krw@, tobiasu@, pirofti@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/powerpc/include/signal.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index fe996e04a5e..e8f521b988a 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.46 2010/09/28 20:27:55 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.47 2012/12/02 07:03:31 guenther Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -150,6 +150,7 @@ extern struct cpu_info cpu_info[PPC_MAXPROCS]; * This is used during profiling to integrate system time. */ #define PROC_PC(p) (trapframe(p)->srr0) +#define PROC_STACK(p) (trapframe(p)->fixreg[1]) void delay(unsigned); #define DELAY(n) delay(n) diff --git a/sys/arch/powerpc/include/signal.h b/sys/arch/powerpc/include/signal.h index 95340ba7602..7258c5a90df 100644 --- a/sys/arch/powerpc/include/signal.h +++ b/sys/arch/powerpc/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.7 2006/01/08 14:20:17 millert Exp $ */ +/* $OpenBSD: signal.h,v 1.8 2012/12/02 07:03:31 guenther Exp $ */ /* $NetBSD: signal.h,v 1.1 1996/09/30 16:34:34 ws Exp $ */ /* @@ -64,7 +64,7 @@ struct trapframe { }; struct sigcontext { - int sc_onstack; /* saved onstack flag */ + int __sc_unused; int sc_mask; /* saved signal mask */ struct trapframe sc_frame; /* saved registers */ }; |