diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-10-19 08:21:03 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-10-19 08:21:03 +0000 |
commit | 182cd58bd85aa0a1c57d9ca89b58b119d42d9eb0 (patch) | |
tree | 6f74f2e639abc3bda79e8fe7e4addfa59ef69f06 /sys/arch/arm | |
parent | 88a75caeb474550a6b2ad841e783cbe1ba7dcd03 (diff) |
Set %r0 to EFAULT instead of the return value from uvm_fault() when it
fails and we're doing a copyin/copyout.
Fixes a buf where systems calls would return EACCESS instead of EFAULT
when accessing userland memory that can't be accessed.
ok patrick@
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/arm/fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/fault.c b/sys/arch/arm/arm/fault.c index 1e1468a4c47..93f30c8589a 100644 --- a/sys/arch/arm/arm/fault.c +++ b/sys/arch/arm/arm/fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fault.c,v 1.42 2020/09/25 14:31:48 phessler Exp $ */ +/* $OpenBSD: fault.c,v 1.43 2020/10/19 08:21:02 kettenis Exp $ */ /* $NetBSD: fault.c,v 1.46 2004/01/21 15:39:21 skrll Exp $ */ /* @@ -349,7 +349,7 @@ data_abort_handler(trapframe_t *tf) if (user == 0) { if (pcb->pcb_onfault) { - tf->tf_r0 = error; + tf->tf_r0 = EFAULT; tf->tf_pc = (register_t) pcb->pcb_onfault; return; } |