summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2019-09-06 16:06:30 +0000
committervisa <visa@openbsd.org>2019-09-06 16:06:30 +0000
commitaafb48453ae9fc3396139a50ee2b28cdade83c95 (patch)
tree8f25e49bd606376ef872309063cfc07e0c5cd240
parentmissing ; (diff)
downloadwireguard-openbsd-aafb48453ae9fc3396139a50ee2b28cdade83c95.tar.xz
wireguard-openbsd-aafb48453ae9fc3396139a50ee2b28cdade83c95.zip
Stop stack trace saving if the current subroutine is u_general or u_intr
because the next frame is in userspace.
-rw-r--r--sys/arch/mips64/mips64/trap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index ed44d7422d0..1227a5aaf70 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.140 2019/09/06 12:22:01 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.141 2019/09/06 16:06:30 visa Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1513,8 +1513,9 @@ db_save_stack_trace(struct db_stack_trace *st)
db_symbol_values(sym, &name, NULL);
subr = pc - (vaddr_t)diff;
- if (subr == (vaddr_t)k_general || subr == (vaddr_t)k_intr ||
- subr == (vaddr_t)u_general || subr == (vaddr_t)u_intr) {
+ if (subr == (vaddr_t)u_general || subr == (vaddr_t)u_intr)
+ break;
+ if (subr == (vaddr_t)k_general || subr == (vaddr_t)k_intr) {
tf = (struct trapframe *)*(register_t *)sp;
pc = tf->pc;
ra = tf->ra;