From owner-freebsd-hackers Mon Apr 22 15:34:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhub.yumyumyum.org (dsl092-171-091.wdc1.dsl.speakeasy.net [66.92.171.91]) by hub.freebsd.org (Postfix) with SMTP id A52D037C065 for ; Mon, 22 Apr 2002 15:23:56 -0700 (PDT) Received: (qmail 21100 invoked from network); 22 Apr 2002 13:23:05 -0000 Received: from ken.yumyumyum.org (192.168.0.2) by router.yumyumyum.org with SMTP; 22 Apr 2002 13:23:05 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Culver To: Terry Lambert Subject: Re: implementing linux mmap2 syscall Date: Mon, 22 Apr 2002 09:23:35 -0400 X-Mailer: KMail [version 1.4] References: <200204211525.08827.culverk@yumyumyum.org> <3CC3E619.8AD5EFF9@mindspring.com> In-Reply-To: <3CC3E619.8AD5EFF9@mindspring.com> Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200204220923.35667.culverk@yumyumyum.org> 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 On Monday 22 April 2002 06:29 am, you wrote: > 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 jus= t > > 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 FreeBS= D > > "mmap2" that basically assumes that the offset passed in is already p= age > > aligned or whatever, and just uses it, and then have linux_mmap2() ju= st > > 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. > OK, I think I can do that, thanks for the help. Will anyone be interested= in=20 patches when/if I get this working? I also implemented ftruncate64 (which= =20 just calls ftruncate).=20 Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message