Module Name: src Committed By: ryo Date: Tue Jul 24 20:55:49 UTC 2018
Modified Files: src/sys/arch/aarch64/aarch64: copyinout.S Log Message: copy(9) had returned -1 if a bad address is encountered. fix to return EFAULT in that case. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/copyinout.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/aarch64/copyinout.S diff -u src/sys/arch/aarch64/aarch64/copyinout.S:1.5 src/sys/arch/aarch64/aarch64/copyinout.S:1.6 --- src/sys/arch/aarch64/aarch64/copyinout.S:1.5 Tue Jul 17 18:08:36 2018 +++ src/sys/arch/aarch64/aarch64/copyinout.S Tue Jul 24 20:55:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: copyinout.S,v 1.5 2018/07/17 18:08:36 christos Exp $ */ +/* $NetBSD: copyinout.S,v 1.6 2018/07/24 20:55:49 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <aarch64/asm.h> #include "assym.h" -RCSID("$NetBSD: copyinout.S,v 1.5 2018/07/17 18:08:36 christos Exp $"); +RCSID("$NetBSD: copyinout.S,v 1.6 2018/07/24 20:55:49 ryo Exp $"); .macro enter_cpu_onfault stp fp, lr, [sp, #-16]! /* save fp, lr */ @@ -48,8 +48,8 @@ RCSID("$NetBSD: copyinout.S,v 1.5 2018/0 stp x2, x3, [sp, #-16]! /* save x2, x3 */ bl cpu_set_onfault ldp x2, x3, [sp], #16 /* restore x2, x3 */ - mvn x8, xzr /* temporary return value = -1 */ - cbnz w0, 9f /* return if error */ + mov x8, x0 /* x8 = cpu_set_onfault() */ + cbnz x0, 9f /* return if error */ mov x0, x19 /* x0 = x19 = arg0 */ mov x1, x20 /* x1 = x20 = arg1 */