From owner-freebsd-emulation@FreeBSD.ORG Sun Nov 4 17:14:56 2007 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 811FC16A469; Sun, 4 Nov 2007 17:14:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from gnome.kiev.sovam.com (gnome.kiev.sovam.com [212.109.32.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2DB13C4C8; Sun, 4 Nov 2007 17:14:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com ([62.64.120.197]) by gnome.kiev.sovam.com with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1Ioj3T-000NBC-M3; Sun, 04 Nov 2007 19:14:35 +0200 Received: from [212.82.216.226] (helo=deviant.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Ioj3R-0006WX-SD; Sun, 04 Nov 2007 19:14:35 +0200 Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id lA4HEOxh032856; Sun, 4 Nov 2007 19:14:24 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1/Submit) id lA4HEO4t032852; Sun, 4 Nov 2007 19:14:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Nov 2007 19:14:23 +0200 From: Kostik Belousov To: Roman Divacky Message-ID: <20071104171423.GL37471@deviant.kiev.zoral.com.ua> References: <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> <47298F10.4050301@chikalov.dp.ua> <20071101152550.GA10868@cons.org> <472B0454.9040408@chikalov.dp.ua> <472B9CD1.1010607@chikalov.dp.ua> <472DAF60.9040008@chikalov.dp.ua> <20071104122023.GA5528@freebsd.org> <472DC7C3.3090105@chikalov.dp.ua> <20071104133518.GA7275@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J2dKNoLeXnWu5vox" Content-Disposition: inline In-Reply-To: <20071104133518.GA7275@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: 1e0f9aa0c43ce3c3744db576a35a93a3 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1734 [Nov 04 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 04 Nov 2007 17:14:56 -0000 --J2dKNoLeXnWu5vox Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 04, 2007 at 02:35:18PM +0100, Roman Divacky wrote: > On Sun, Nov 04, 2007 at 03:23:15PM +0200, Valery V.Chikalov wrote: > > Roman Divacky ??????????: > > >=20 > > > I am a little confused.. you are saying that > > >=20 > > > 1) oracle calls m* on 0x50000000 with PROT_EXEC but fbsd does not set= it on the map > > >=20 > > > or > > >=20 > > > 2) oracle does not set this protection at all and the OS is supposed = to have set on default? > > >=20 > > > roman > >=20 > >=20 > > rather 3) I cant find function which oracle calls to manage memory at > > 0x50000000, this is why I ask for help. > > I can only state that linux_mprotect dont called with addr at 0x5000000= 0. > >=20 > > Nov 4 12:40:14 tiger kernel: mprotect: addr:55c00000, len:4096, prot:1, > > bsdprot:5, ret:0 > > Nov 4 12:40:14 tiger kernel: mprotect: addr:55c81000, len:4096, prot:1, > > bsdprot:5, ret:0 > >=20 > > This are only addresses which are arguments for linux_mprotect. > > I have suspected linux_mmap_common but it not called either. >=20 > the protection can be set from mmap(), can you see if there is a mmap cal= l with 0x50....0 ? SysV shm is mapped by the shmat(2) syscall. linux compat implementation, linux_shmat(), calls shmat() (this shall be fixed to use kern_shmat). Look for the VM_PROT_READ_IS_EXEC in the sys/kern/sysv_shm.c. I think that would explain both reason for the fault and missing mmap() calls. It should be fixed by acting as if VM_PROT_READ_IS_EXEC is enabled if kern_shmat() is called from linux_shmat(). This might cause some problems when shared segment is being attached both by freebsd and linux processes. --J2dKNoLeXnWu5vox Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHLf3vC3+MBN1Mb4gRAtkBAKDdtL36aNbwvVXbSb3G+3euvnb9GgCdE87X tLkLpBjjy71H528QUeLu/fQ= =kp85 -----END PGP SIGNATURE----- --J2dKNoLeXnWu5vox--