summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-09-24 23:50:00 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-09-24 23:50:00 +0000
commit32f134c04925e9eb7d447e09bfaac09f127812b3 (patch)
tree56cd0efd434e9be93667e5ae037a7044a8d9c0d7 /sys/arch/sparc64
parent024657046cede08ec5aa34e41d6fe38453217688 (diff)
The sparc64 pagefault vectors are directly to specific functions, and
all 3 were missing refreshcreds() preceding calls to uvm_fault() ok kettenis
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/trap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 360321ee896..1784b3ef81a 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.104 2020/09/24 17:54:30 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.105 2020/09/24 23:49:59 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -788,6 +788,7 @@ data_access_fault(struct trapframe64 *tf, unsigned type, vaddr_t pc,
}
} else {
p->p_md.md_tf = tf;
+ refreshcreds(p);
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))
@@ -978,6 +979,7 @@ text_access_fault(struct trapframe64 *tf, unsigned type, vaddr_t pc,
/* NOTREACHED */
} else {
p->p_md.md_tf = tf;
+ refreshcreds(p);
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))
@@ -1086,6 +1088,7 @@ text_access_error(struct trapframe64 *tf, unsigned type, vaddr_t pc,
/* NOTREACHED */
} else {
p->p_md.md_tf = tf;
+ refreshcreds(p);
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))