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/hppa/include | |
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/hppa/include')
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/hppa/include/signal.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index 62cbd5aae30..c74038cd926 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.80 2011/09/20 21:44:09 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.81 2012/12/02 07:03:31 guenther Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -202,6 +202,7 @@ extern int cpu_hvers; #define need_proftick(p) setsoftast(p) #define PROC_PC(p) ((p)->p_md.md_regs->tf_iioq_head) +#define PROC_STACK(p) ((p)->p_md.md_regs->tf_sp) #ifndef _LOCORE #ifdef _KERNEL diff --git a/sys/arch/hppa/include/signal.h b/sys/arch/hppa/include/signal.h index e44a2cca195..80beef1253e 100644 --- a/sys/arch/hppa/include/signal.h +++ b/sys/arch/hppa/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.9 2011/11/14 14:29:53 deraadt Exp $ */ +/* $OpenBSD: signal.h,v 1.10 2012/12/02 07:03:31 guenther Exp $ */ /* * Copyright (c) 1994, The University of Utah and @@ -47,7 +47,7 @@ typedef int sig_atomic_t; * a non-standard exit is performed. */ struct sigcontext { - unsigned long sc_onstack; /* sigstack state to restore */ + unsigned long __sc_unused; unsigned long sc_mask; /* signal mask to restore */ unsigned long sc_ps; /* psl to restore */ unsigned long sc_fp; /* fp to restore */ |