Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 copy(9) had returned -1 if a bad ad...



details:   https://anonhg.NetBSD.org/src/rev/d4722a2bf400
branches:  trunk
changeset: 991657:d4722a2bf400
user:      ryo <ryo%NetBSD.org@localhost>
date:      Tue Jul 24 20:55:49 2018 +0000

description:
copy(9) had returned -1 if a bad address is encountered. fix to return EFAULT in that case.

diffstat:

 sys/arch/aarch64/aarch64/copyinout.S |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 75df963506cb -r d4722a2bf400 sys/arch/aarch64/aarch64/copyinout.S
--- a/sys/arch/aarch64/aarch64/copyinout.S      Tue Jul 24 20:49:19 2018 +0000
+++ b/sys/arch/aarch64/aarch64/copyinout.S      Tue Jul 24 20:55:49 2018 +0000
@@ -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 @@
        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 */



Home | Main Index | Thread Index | Old Index