From owner-freebsd-emulation@FreeBSD.ORG Mon Jun 25 06:05:23 2007 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5140516A41F for ; Mon, 25 Jun 2007 06:05:23 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0A3EE13C45D for ; Mon, 25 Jun 2007 06:05:22 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I2hgo-0003WF-7t for freebsd-emulation@freebsd.org; Mon, 25 Jun 2007 08:04:42 +0200 Received: from 81.210.251.162 ([81.210.251.162]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jun 2007 08:04:42 +0200 Received: from saper by 81.210.251.162 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jun 2007 08:04:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-emulation@freebsd.org From: Marcin Cieslak Date: Mon, 25 Jun 2007 08:03:44 +0200 Lines: 15 Message-ID: References: <466AFD29.7040108@barafranca.com> <466BE4FA.1020804@barafranca.com> <20070612223746.25d44a5c.ariff@FreeBSD.org> <200706121313.51377.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.251.162 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.2) Gecko/20070309 SeaMonkey/1.1.1 In-Reply-To: <200706121313.51377.jkim@FreeBSD.org> Sender: news Subject: Re: snd_es137x & -CURRENT, /dev/dsp: Invalid argument -- Could not mmap /dev/dsp - linux emulation problem? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2007 06:05:23 -0000 Jung-uk Kim wrote: > To mimic (broken) Linux behavior. ;-) Seriously Linux kernel for i386 > (without NX/XD bit support) implies PROT_EXEC when PROT_READ or > PROT_WRITE is set even if you don't specify. In FreeBSD, we have to > explicitly specify PROT_EXEC. Therefore the hack was required. In > fact, 32-bit mmap implementation for Linux/ia64 does exactly this to > run i386 binaries. Many (broken) Linux-only applications had abused > this bug in the past and I believe they still exist widely. If you > want, you can add a tunable to turn off this behavior but please > leave it on by default. I just wonder why it breaks now with /dev/dsp*. Perhaps we should not do PROT_EXEC on devices? --Marcin