From owner-freebsd-emulation Mon Apr 22 16:27:19 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from deathrow.mail.pas.earthlink.net (deathrow.mail.pas.earthlink.net [207.217.120.19]) by hub.freebsd.org (Postfix) with ESMTP id 39AEB37B8A4; Mon, 22 Apr 2002 16:20:34 -0700 (PDT) Received: from gull.mail.pas.earthlink.net ([207.217.120.84] helo=gull.prod.itd.earthlink.net) by deathrow.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16zb5L-0000CN-00; Mon, 22 Apr 2002 03:30:15 -0700 Received: from pool0081.cvx40-bradley.dialup.earthlink.net ([216.244.42.81] helo=mindspring.com) by gull.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 16zb5I-0002Za-00; Mon, 22 Apr 2002 03:30:13 -0700 Message-ID: <3CC3E619.8AD5EFF9@mindspring.com> Date: Mon, 22 Apr 2002 03:29:45 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Kenneth Culver Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: implementing linux mmap2 syscall References: <200204211525.08827.culverk@yumyumyum.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@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: > So what it looks like to me is that mmap2 expects an offset that's already > page-aligned (I'm not sure if this is the right way to say it), where mmap > doesn't. the FreeBSD code in the linuxulator basically just takes the offset > that is passed in with the linux mmap, and uses that to call FreeBSD's mmap > (the kernel version, not the one called from userland). So basically I'm > kinda stuck as to what to do to implement linux's mmap2. The only thing I can > think of is to implement a FreeBSD "mmap2" that basically assumes that the > offset passed in is already page aligned or whatever, and just uses it, and > then have linux_mmap2() just call the FreeBSD mmap2(). Any ideas? This is too much work. Basically, it just wants to bitch when the offset is not page aligned, and then call the old mmap if it doesn't bitch. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message