summaryrefslogtreecommitdiff
path: root/sys/arch/arm64
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-09-16 02:03:41 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-09-16 02:03:41 +0000
commit28934186950b2f55a492e9a372a2030e04c27ace (patch)
treef147306a534ad6fca0bee9ced48d796e05273ac4 /sys/arch/arm64
parentd866e3a014e7c2d407873e122ad6c8b9c418295c (diff)
The copyin(9) family of functions should return EFAULT for all memory
protection issues. So make amd64 do that instead of passing through uvm_fault()'s return value, which lead to other possible errors (particularly EACCES) being returned to userspace. Clean up a vestige on arm64 too. ok bluhn@ deraadt@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r--sys/arch/arm64/arm64/trap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/arch/arm64/arm64/trap.c b/sys/arch/arm64/arm64/trap.c
index 537cd199515..5e14cfd87b5 100644
--- a/sys/arch/arm64/arm64/trap.c
+++ b/sys/arch/arm64/arm64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.10 2017/08/14 21:53:34 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.11 2017/09/16 02:03:40 guenther Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
@@ -210,7 +210,6 @@ data_abort(struct trapframe *frame, uint64_t esr, int lower, int exe)
} else {
if (curcpu()->ci_idepth == 0 &&
pcb->pcb_onfault != 0) {
- frame->tf_x[0] = error;
frame->tf_elr = (register_t)pcb->pcb_onfault;
return;
}