Date: Wed, 5 Sep 2018 09:53:55 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338466 - head/sys/riscv/riscv Message-ID: <201809050953.w859rtne024869@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Wed Sep 5 09:53:55 2018 New Revision: 338466 URL: https://svnweb.freebsd.org/changeset/base/338466 Log: Fix bug: compare uaddr to VM_MAXUSER_ADDRESS, not to a tmp value left by SET_FAULT_HANDLER(). Approved by: re (kib) Sponsored by: DARPA, AFRL Modified: head/sys/riscv/riscv/copyinout.S Modified: head/sys/riscv/riscv/copyinout.S ============================================================================== --- head/sys/riscv/riscv/copyinout.S Wed Sep 5 01:46:27 2018 (r338465) +++ head/sys/riscv/riscv/copyinout.S Wed Sep 5 09:53:55 2018 (r338466) @@ -111,12 +111,12 @@ END(copyin) ENTRY(copyinstr) mv a5, x0 /* count = 0 */ beqz a2, 3f /* If len == 0 then skip loop */ - li a7, VM_MAXUSER_ADDRESS la a6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(a6, a7) /* Set the handler */ -1: bgt a7, a0, copyio_fault + li a7, VM_MAXUSER_ADDRESS +1: bgt a0, a7, copyio_fault lb a4, 0(a0) /* Load from uaddr */ addi a0, a0, 1 sb a4, 0(a1) /* Store in kaddr */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809050953.w859rtne024869>