summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/alpha/trap.c4
-rw-r--r--sys/arch/amd64/amd64/trap.c4
-rw-r--r--sys/arch/arm/arm/fault.c4
-rw-r--r--sys/arch/arm64/arm64/trap.c8
-rw-r--r--sys/arch/hppa/hppa/trap.c5
-rw-r--r--sys/arch/i386/i386/trap.c4
-rw-r--r--sys/arch/m88k/m88k/trap.c6
-rw-r--r--sys/arch/mips64/mips64/trap.c6
-rw-r--r--sys/arch/powerpc/powerpc/trap.c5
-rw-r--r--sys/arch/sh/sh/trap.c4
-rw-r--r--sys/arch/sparc64/sparc64/trap.c6
11 files changed, 29 insertions, 27 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 5f4f5b22f62..252e2fdd69d 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.87 2019/07/09 23:48:06 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.88 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -247,7 +247,7 @@ trap(a0, a1, a2, entry, framep)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
switch (entry) {
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c
index 31737f6706d..6ba0850f685 100644
--- a/sys/arch/amd64/amd64/trap.c
+++ b/sys/arch/amd64/amd64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.76 2019/07/09 23:48:07 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.77 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */
/*-
@@ -331,7 +331,7 @@ usertrap(struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
switch (type) {
case T_PROTFLT: /* protection fault */
diff --git a/sys/arch/arm/arm/fault.c b/sys/arch/arm/arm/fault.c
index a8a9a02d0ba..303ede0f24d 100644
--- a/sys/arch/arm/arm/fault.c
+++ b/sys/arch/arm/arm/fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fault.c,v 1.38 2019/07/09 23:48:08 deraadt Exp $ */
+/* $OpenBSD: fault.c,v 1.39 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: fault.c,v 1.46 2004/01/21 15:39:21 skrll Exp $ */
/*
@@ -211,7 +211,7 @@ data_abort_handler(trapframe_t *tf)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
/* Invoke the appropriate handler, if necessary */
diff --git a/sys/arch/arm64/arm64/trap.c b/sys/arch/arm64/arm64/trap.c
index a92ddd06900..b346196430b 100644
--- a/sys/arch/arm64/arm64/trap.c
+++ b/sys/arch/arm64/arm64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.24 2019/07/09 23:48:07 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.25 2019/09/06 12:22:01 deraadt Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
@@ -245,9 +245,9 @@ do_el0_sync(struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
- switch(exception) {
+ switch (exception) {
case EXCP_UNKNOWN:
vfp_save();
curcpu()->ci_flush_bp();
@@ -316,7 +316,7 @@ do_el0_sync(struct trapframe *frame)
sigexit(p, SIGILL);
KERNEL_UNLOCK();
}
-
+out:
userret(p);
}
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index b8ab29b5eb0..e3a56d7a1ca 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.145 2019/07/09 23:48:07 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.146 2019/09/06 12:22:01 deraadt Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -218,7 +218,7 @@ trap(int type, struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
switch (type) {
@@ -653,6 +653,7 @@ datalign_user:
if ((type & T_USER) && !(frame->tf_iisq_head == HPPA_SID_KERNEL &&
(frame->tf_iioq_head & ~PAGE_MASK) == SYSCALLGATE)) {
ast(p);
+out:
userret(p);
}
}
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index 44737a3db92..f683fbd70a2 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.140 2019/07/09 23:48:07 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.141 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
@@ -160,7 +160,7 @@ trap(struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
switch (type) {
diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c
index 4b2d6a8f7e1..3da7e0693a6 100644
--- a/sys/arch/m88k/m88k/trap.c
+++ b/sys/arch/m88k/m88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.109 2019/07/09 23:48:08 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.110 2019/09/06 12:22:01 deraadt Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -242,7 +242,7 @@ m88100_trap(u_int type, struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto userexit;
}
fault_type = SI_NOINFO;
fault_code = 0;
@@ -686,7 +686,7 @@ m88110_trap(u_int type, struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto userexit;
}
if (sig != 0)
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index 56bd713caa6..ed44d7422d0 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.139 2019/08/02 07:41:13 visa Exp $ */
+/* $OpenBSD: trap.c,v 1.140 2019/09/06 12:22:01 deraadt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -265,11 +265,11 @@ trap(struct trapframe *trapframe)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
itsa(trapframe, ci, p, type);
-
+out:
if (type & T_USER)
userret(p);
}
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index e7b39f3191b..2f0b218ba6c 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.110 2019/07/20 23:03:55 mpi Exp $ */
+/* $OpenBSD: trap.c,v 1.111 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -239,7 +239,7 @@ trap(struct trapframe *frame)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
switch (type) {
@@ -612,6 +612,7 @@ for (i = 0; i < errnum; i++) {
break;
}
+out:
userret(p);
finish:
diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c
index 8f645e46f05..539317353d4 100644
--- a/sys/arch/sh/sh/trap.c
+++ b/sys/arch/sh/sh/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.39 2019/07/09 23:48:08 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.40 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */
/* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */
@@ -176,7 +176,7 @@ general_exception(struct proc *p, struct trapframe *tf, uint32_t va)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
+ goto out;
}
switch (expevt) {
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 77d4d4089ab..753ba6d5847 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.101 2019/07/09 23:48:08 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.102 2019/09/06 12:22:01 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -429,8 +429,7 @@ trap(struct trapframe64 *tf, unsigned type, vaddr_t pc, long tstate)
if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p),
"[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n",
uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
- return;
-
+ goto out;
switch (type) {
@@ -707,6 +706,7 @@ dopanic:
KERNEL_UNLOCK();
break;
}
+out:
userret(p);
share_fpu(p, tf);
#undef ADVANCE