Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/i386 Sync with i386/locore.S 1.33:



details:   https://anonhg.NetBSD.org/src/rev/1448f4ff0c38
branches:  trunk
changeset: 574905:1448f4ff0c38
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Mar 16 14:52:29 2005 +0000

description:
Sync with i386/locore.S 1.33:
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/xen/i386/locore.S |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 439bcedac522 -r 1448f4ff0c38 sys/arch/xen/i386/locore.S
--- a/sys/arch/xen/i386/locore.S        Wed Mar 16 12:59:08 2005 +0000
+++ b/sys/arch/xen/i386/locore.S        Wed Mar 16 14:52:29 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.9 2005/03/09 22:39:20 bouyer Exp $        */
+/*     $NetBSD: locore.S,v 1.10 2005/03/16 14:52:29 bouyer Exp $       */
 /*     NetBSD: locore.S,v 1.31 2004/08/26 10:12:33 junyoung Exp        */
 
 /*-
@@ -929,6 +929,7 @@
         */
        movl    $VM_MAXUSER_ADDRESS,%eax
        subl    %edi,%eax
+       jc      _C_LABEL(copystr_efault)
        cmpl    %edx,%eax
        jae     1f
        movl    %eax,%edx
@@ -983,6 +984,7 @@
         */
        movl    $VM_MAXUSER_ADDRESS,%eax
        subl    %esi,%eax
+       jc      _C_LABEL(copystr_efault)
        cmpl    %edx,%eax
        jae     1f
        movl    %eax,%edx



Home | Main Index | Thread Index | Old Index