diff options
author | 2006-02-05 19:53:34 +0000 | |
---|---|---|
committer | 2006-02-05 19:53:34 +0000 | |
commit | 8469c95023d0448e2c09138e7416cf19264c0a87 (patch) | |
tree | 9c84a2ab168061646d7bb766481cd4e950518e65 | |
parent | call vr_setmulti() if adjusting PROMISC or ALLMULTI and do not do a full (diff) | |
download | wireguard-openbsd-8469c95023d0448e2c09138e7416cf19264c0a87.tar.xz wireguard-openbsd-8469c95023d0448e2c09138e7416cf19264c0a87.zip |
Commit uncommitted bit from 2006/01/03 change to locore.s:
Try to prevent red stating the machine on a misaligned user space stack by
SIGKILLing the process.
ok miod@, henric@
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index b16e3c4b5dc..e83de626ae7 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.39 2006/01/30 21:26:19 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.40 2006/02/05 19:53:34 kettenis Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -477,7 +477,8 @@ trap(tf, type, pc, tstate) tf->tf_tstate |= (PSTATE_PEF<<TSTATE_PSTATE_SHIFT); return; } - goto dopanic; + if (type != T_SPILL_N_NORM && type != T_FILL_N_NORM) + goto dopanic; } if ((p = curproc) == NULL) p = &proc0; @@ -627,6 +628,19 @@ badtrap: break; } + case T_SPILL_N_NORM: + case T_FILL_N_NORM: + /* + * We got an alignment trap in the spill/fill handler. + * + * XXX We really should generate a bus error here, but + * we could be on the interrupt stack, and dumping + * core from the interrupt stack is not a good idea. + * It causes random crashes. + */ + sigexit(p, SIGKILL); + break; + case T_ALIGN: case T_LDDF_ALIGN: case T_STDF_ALIGN: |