Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/arch/amd64/amd64 Pull up revision 1.2 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/6b0ac991af69
branches:  netbsd-2-0
changeset: 564681:6b0ac991af69
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Mar 16 11:49:47 2005 +0000

description:
Pull up revision 1.2 (requested by fvdl in ticket #1317):
Check the passed in address as well as determining the maximum length
using VM_MAXUSER_ADDRESS in copyinstr and copyoutstr.
Problem originally fixed in OpenBSD/i386.
This fix suggested by Charles Hannum (mycroft at netbsd dot org).

diffstat:

 sys/arch/amd64/amd64/copy.S |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r a5cd1403fb3f -r 6b0ac991af69 sys/arch/amd64/amd64/copy.S
--- a/sys/arch/amd64/amd64/copy.S       Wed Mar 16 11:38:28 2005 +0000
+++ b/sys/arch/amd64/amd64/copy.S       Wed Mar 16 11:49:47 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copy.S,v 1.1 2003/04/26 18:39:26 fvdl Exp $    */
+/*     $NetBSD: copy.S,v 1.1.4.1 2005/03/16 11:49:47 tron Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -207,6 +207,7 @@
         */
        movq    $VM_MAXUSER_ADDRESS,%rax
        subq    %rdi,%rax
+       jc      _C_LABEL(copystr_efault)
        cmpq    %rdx,%rax
        jae     1f
        movq    %rax,%rdx
@@ -248,6 +249,7 @@
         */
        movq    $VM_MAXUSER_ADDRESS,%rax
        subq    %rsi,%rax
+       jc      _C_LABEL(copystr_efault)
        cmpq    %rdx,%rax
        jae     1f
        movq    %rax,%rdx



Home | Main Index | Thread Index | Old Index