From owner-freebsd-hackers Wed Apr 24 8:48:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 2CE4437B419; Wed, 24 Apr 2002 08:48:23 -0700 (PDT) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id LAA24700; Wed, 24 Apr 2002 11:47:57 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g3OFlRf92953; Wed, 24 Apr 2002 11:47:27 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15558.54159.737973.56540@grasshopper.cs.duke.edu> Date: Wed, 24 Apr 2002 11:47:27 -0400 (EDT) To: Brandon S Allbery KF8NH Cc: Kenneth Culver , freebsd-hackers@FreeBSD.ORG, FreeBSD-CURRENT List Subject: Re: implementing linux mmap2 syscall In-Reply-To: <1019662269.6094.1.camel@pyanfar.ece.cmu.edu> References: <15557.27747.802212.659760@grasshopper.cs.duke.edu> <20020423181748.W31638-100000@alpha.yumyumyum.org> <15558.46600.351433.784766@grasshopper.cs.duke.edu> <1019662269.6094.1.camel@pyanfar.ece.cmu.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brandon S Allbery KF8NH writes: > On Wed, 2002-04-24 at 10:41, Andrew Gallatin wrote: > > Maybe the argument isn't where you expect it to be, but is there. > > Can you make a test program which calls mmap2 with its 6th arg as > > something unique like 0xdeadbeef? Then print out (in hex :) the trapframe > > from the linux prepsyscall routine & see if you can find the deadbeef. > > My recollection is that beyond 5 arguments, a pointer to the remaining > ones is passed. (But my recollection may be wrong and I don't wish to > subject myself to the source cesspool at the moment....) > I think that's how it used to work. Apparently, they've changed it recently and they now pass 6 args in registers. Eg, in the linux kernel sources, old_mmap() fetches its args via copy_from_user(), whereas the newer sys_mmap2() doesn't. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message