From aeddc3fc1c2dc619781d7d37222447f40fb248a7 Mon Sep 17 00:00:00 2001 From: drahn Date: Sat, 15 May 2021 00:04:32 +0000 Subject: [PATCH] Load the fault handler into the correct register. Having the onfault dance in a macro makes this almost unreadable. Initial failure found by deraadt, cause finally found. --- sys/arch/riscv64/riscv64/copy.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/riscv64/riscv64/copy.S b/sys/arch/riscv64/riscv64/copy.S index 9412945de1c..84fa6442ae3 100644 --- a/sys/arch/riscv64/riscv64/copy.S +++ b/sys/arch/riscv64/riscv64/copy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: copy.S,v 1.2 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: copy.S,v 1.3 2021/05/15 00:04:32 drahn Exp $ */ /* * Copyright (c) 2020 Brian Bamsch @@ -94,7 +94,7 @@ ENTRY(copyout) li a4, VM_MAXUSER_ADDRESS bgt a3, a4, .Lcopyiofault_nopcb - la a4, .Lcopyiofault_user + la a3, .Lcopyiofault_user SWAP_FAULT_HANDLER(a3, a4, a5) ENTER_USER_ACCESS(a4) -- 2.20.1