summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2020-10-20 15:21:45 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2020-10-20 15:21:45 +0000
commit9db3dbee93cdf4560a1155d42531437a7b6eb980 (patch)
treece09518d2c1247cc133aae55751fc9b40654d74d
parent60f8a474b73f9320deccdaf965b4dfd774274481 (diff)
Add handling for a trap instruction that terminates the process.
OK deraadt@
-rw-r--r--sys/arch/mips64/mips64/trap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index 4dad42894b9..1e4476b6888 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.149 2020/10/08 19:41:05 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.150 2020/10/20 15:21:44 visa Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -762,6 +762,11 @@ fault_common_no_miss:
(instr & 0x001fffc0) == ((ZERO << 16) | (7 << 6))) {
signal = SIGFPE;
sicode = FPE_INTDIV;
+ } else if (instr == (0x00000034 | (0x52 << 6)) /* teq */) {
+ /* trap used by sigfill and similar */
+ KERNEL_LOCK();
+ sigexit(p, SIGABRT);
+ /* NOTREACHED */
} else if ((instr & 0xfc00003f) == 0x00000036 /* tne */ &&
(instr & 0x0000ffc0) == (0x52 << 6)) {
KERNEL_LOCK();