diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-02-05 19:53:35 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-02-05 19:53:35 +0000 |
commit | 3fe041c0324ee86aa815121f7c724ec4958c9a97 (patch) | |
tree | 20db5648a132cb5860df13c6d261a0b4b872409c /sys/arch/sparc64 | |
parent | 94e57ab59d4f7c46b1dff3080c5d629576558290 (diff) |
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@
Diffstat (limited to 'sys/arch/sparc64')
-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: |