From owner-freebsd-current Wed Apr 24 17: 1:47 2002 Delivered-To: freebsd-current@freebsd.org Received: from fw.wemm.org (12-232-135-171.client.attbi.com [12.232.135.171]) by hub.freebsd.org (Postfix) with ESMTP id 14F2837B419; Wed, 24 Apr 2002 17:01:26 -0700 (PDT) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (8.11.6/8.11.6) with ESMTP id g3ONxle36582; Wed, 24 Apr 2002 16:59:47 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 0B67E38FD; Wed, 24 Apr 2002 16:59:47 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Kenneth Culver Cc: John Baldwin , FreeBSD-CURRENT List , freebsd-hackers@FreeBSD.ORG, Brandon S Allbery KF8NH , Andrew Gallatin Subject: Re: implementing linux mmap2 syscall In-Reply-To: <20020424194250.Y39769-100000@alpha.yumyumyum.org> Date: Wed, 24 Apr 2002 16:59:47 -0700 From: Peter Wemm Message-Id: <20020424235947.0B67E38FD@overcee.wemm.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kenneth Culver wrote: > > I'm actually still not seeing a match between what's in truss, and what's > > in my printed-out args, but it seems to be working anyway... > > > Argh, it's not working again... It was working on an install of ms office, > but it won't work on some old windows game.. (winex) and it's still not > setting the last arg (or register properly): > > truss output: > > linux_mmap2(0x65430000,0x100000,0x3,0x11,0x9,0x6) = 1698889728 > (0x65430000) > > notice that the last arg is 0x6, that's the page offset... > > what the kernel prints for the same call: > > mmap2(0x65430000, 1048576, 3, 0x00000011, 9, 0) > > notice that they both have all the same values until you get to the last > one... at which point the value is wrong... Apparently this only causes > problems on some windows programs that one may try to execute, and not on > others... > > So, where can I force this to get set? > > Ken Try this: RCS file: /home/ncvs/src/sys/i386/linux/linux_sysvec.c,v retrieving revision 1.99 diff -u -2 -r1.99 linux_sysvec.c --- linux_sysvec.c 4 Apr 2002 17:49:46 -0000 1.99 +++ linux_sysvec.c 24 Apr 2002 23:57:23 -0000 @@ -711,4 +711,5 @@ args[3] = tf->tf_esi; args[4] = tf->tf_edi; + args[5] = tf->tf_ebp; *params = NULL; /* no copyin */ } Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message