From owner-freebsd-current@FreeBSD.ORG Sat Jun 18 12:06:37 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C42616A41C for ; Sat, 18 Jun 2005 12:06:37 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1280243D53 for ; Sat, 18 Jun 2005 12:06:36 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so39515nzp for ; Sat, 18 Jun 2005 05:06:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=umq+klUD0CeuXcZc4N0k72Tt4JLQeGnsFjX1ug5UD0YFFOBjYhNxnhc4s+YhzN7tVVo26rdnbQ2NLOfE37+aMA3XR5HLeO5Hq2Uf0ijoz48elYaJl5d/Bzp2JZlCERybqYkbhzRKM7GYN5Rb1UQLhT2/htFCeuJ1h0qgRrLn4ho= Received: by 10.36.24.6 with SMTP id 6mr2031269nzx; Sat, 18 Jun 2005 05:06:36 -0700 (PDT) Received: by 10.36.68.15 with HTTP; Sat, 18 Jun 2005 05:06:36 -0700 (PDT) Message-ID: <34cb7c84050618050623db6187@mail.gmail.com> Date: Sat, 18 Jun 2005 13:06:36 +0100 From: Peter Edwards To: Alexander Leidinger In-Reply-To: <20050618083026.26238653@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050617180232.GA25818@freefall.freebsd.org> <42B31247.9010603@portaone.com> <34cb7c840506171121cd0437f@mail.gmail.com> <42B3189E.6030408@portaone.com> <34cb7c8405061716327ca4c6d7@mail.gmail.com> <20050618083026.26238653@Magellan.Leidinger.net> Cc: current@freebsd.org Subject: Re: Towards a working "wine". [long] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Edwards List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2005 12:06:37 -0000 On 6/18/05, Alexander Leidinger wrote: > On Fri, 17 Jun 2005 17:59:38 -0700 (PDT) > Jon Dama wrote: >=20 > > My intuition says that mmap should ignore requests to map into the > > existing brk region but not reject requests that are merely between the > > existing brk region and the DS limit. >=20 > Have you seen Martin Cracauer's mail ("My hacks to make the memory map > fit") on emulation@ which deals with the memory map? Maybe it's of help > here... No I hadn't seen them, thanks for the reference. These won't help in this case: It's almost the opposite problem. I think. Martin's hack leaves a gap between the data segment and the area that mmap starts looking in for address space. However, because of the format of the wine binary, it's data segment is very high in memory, and the area required by wine's mmap actually falls inside it. i.e., Martins fix pushes out the starting point for mmap searches, but wine needs hit dragged in. Jean-Marc DETREZ posted an interesting patch to emulation@ and wine's patches list around the same time that's more promising, though: "patch for unbreaking wine on freebsd" This uses mincore() + mmap(... MAP_FIXED ...) when mincore returns EFAULT. I'll have a read of it. It looks like both OpenBSD and NetBSD now incorporate a MAP_TRYFIXED, though. And, from a comment on the OpenBSD 3.4 changelog, adding it to the linuxulator may also help compatibility there.