Module Name: src
Committed By: martin
Date: Sun May 5 08:34:16 UTC 2019
Modified Files:
src/sys/arch/amd64/amd64 [netbsd-8]: copy.S
src/sys/arch/i386/i386 [netbsd-8]: copy.S
Log Message:
Pull up following revision(s) (requested by maxv in ticket #1257):
sys/arch/amd64/amd64/copy.S: revision 1.33
sys/arch/i386/i386/copy.S: revision 1.31
Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas
overlap, but doesn't clear it if the copy faults. If this happens, we
return to the caller with DF=1, and each future memory copy will be
backwards.
I wonder if there really are places where kcopy() is called with
overlapping areas.
To generate a diff of this commit:
cvs rdiff -u -r1.20.10.3 -r1.20.10.4 src/sys/arch/amd64/amd64/copy.S
cvs rdiff -u -r1.25.8.1 -r1.25.8.2 src/sys/arch/i386/i386/copy.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/amd64/amd64/copy.S
diff -u src/sys/arch/amd64/amd64/copy.S:1.20.10.3 src/sys/arch/amd64/amd64/copy.S:1.20.10.4
--- src/sys/arch/amd64/amd64/copy.S:1.20.10.3 Sat Apr 14 10:11:49 2018
+++ src/sys/arch/amd64/amd64/copy.S Sun May 5 08:34:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.S,v 1.20.10.3 2018/04/14 10:11:49 martin Exp $ */
+/* $NetBSD: copy.S,v 1.20.10.4 2019/05/05 08:34:16 martin Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -242,6 +242,7 @@ NENTRY(copy_efault)
END(copy_efault)
NENTRY(kcopy_fault)
+ cld
ret
END(kcopy_fault)
Index: src/sys/arch/i386/i386/copy.S
diff -u src/sys/arch/i386/i386/copy.S:1.25.8.1 src/sys/arch/i386/i386/copy.S:1.25.8.2
--- src/sys/arch/i386/i386/copy.S:1.25.8.1 Sun Feb 4 12:40:31 2018
+++ src/sys/arch/i386/i386/copy.S Sun May 5 08:34:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.S,v 1.25.8.1 2018/02/04 12:40:31 martin Exp $ */
+/* $NetBSD: copy.S,v 1.25.8.2 2019/05/05 08:34:16 martin Exp $ */
/*
* Copyright (c) 1998, 2000, 2004, 2008 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25.8.1 2018/02/04 12:40:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.25.8.2 2019/05/05 08:34:16 martin Exp $");
#include "assym.h"
@@ -305,6 +305,7 @@ END(copy_efault)
*/
NENTRY(kcopy_fault)
+ cld
popl %edi
popl %esi
ret