summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-06-28 05:51:43 +0000
committerderaadt <deraadt@openbsd.org>2019-06-28 05:51:43 +0000
commitc2e8fdfa702725e2b67cb798bf7c018b805638da (patch)
treeba1e9acf48410a8d5d384cbb6236d2ffecbd0f3f
parentlocal __libcpp_asprintf_l() -> libc asprintf() was inspecting the pointer (diff)
downloadwireguard-openbsd-c2e8fdfa702725e2b67cb798bf7c018b805638da.tar.xz
wireguard-openbsd-c2e8fdfa702725e2b67cb798bf7c018b805638da.zip
landisk/sh didn't have the code for checking if sp is on MAP_STACK
memory, so let's add that where it seems to work gap noticed by miod
-rw-r--r--sys/arch/sh/sh/trap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c
index bf0bd8415c9..34c6318d375 100644
--- a/sys/arch/sh/sh/trap.c
+++ b/sys/arch/sh/sh/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.37 2017/01/21 05:42:03 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.38 2019/06/28 05:51:43 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 $ */
@@ -173,6 +173,9 @@ general_exception(struct proc *p, struct trapframe *tf, uint32_t va)
KDASSERT(p->p_md.md_regs == tf); /* check exception depth */
expevt |= EXP_USER;
refreshcreds(p);
+ if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p), "sp",
+ uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial))
+ return;
}
switch (expevt) {