From owner-freebsd-emulation@FreeBSD.ORG Sun Nov 4 11:41:47 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 9495416A41A; Sun, 4 Nov 2007 11:41:46 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2040013C48D; Sun, 4 Nov 2007 11:41:45 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 40D345C032; Sun, 4 Nov 2007 13:41:26 +0200 (EET) Message-ID: <472DAF60.9040008@chikalov.dp.ua> Date: Sun, 04 Nov 2007 13:39:12 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Martin Cracauer References: <4721AB07.20708@novakom.com.ua> <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> In-Reply-To: <472B9CD1.1010607@chikalov.dp.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 11:41:47 -0000 Valery V.Chikalov wrote: [...] > Ok, I have fond what is so special with this memory. Oracle uses SYSV > shared memory, and comparing output from "ipcs -mb" and > /compat/linux/proc//maps it's became clear that that suspiciously > looking too high addresses of memory chunks with missed execution bit > are SYSV shared memory areas. > > > 50000000-55c00000 rw-p 05c83000 00:00 0 - this is main chunk which > can be seen in output of "show sga" sqlplus command > > > 55c00000-55c01000 r--p 05c83000 00:00 0 > > 55c01000-55c81000 rw-p 05c83000 00:00 0 > > 55c81000-55c82000 r--p 05c83000 00:00 0 > > 55c82000-55c83000 rw-p 05c83000 00:00 0 - this are adjusted to the > end small (4096) pieces > I made a step a little further. It's now clear that we are interested in memory only from address 0x50000000 (this is also confirming by oracle manual). So now we can narrow the area of mprotect monitoring: if (uap->addr >= 0x50000000) printf("mprotect: addr:%lx, len:%d, prot:%d, bsdprot:%d, ret:%d\n", (unsigned long)uap->addr, uap->len, uap->prot, bsd_args.prot, ret); OTOH I have hacked the /sys/vm/vm_map.c by commenting out the next lines: /* if ((new_prot & current->max_protection) != new_prot) { vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } */ Leave out the reason why it failing for now. as a result we are geting: 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 this two lines repeating 9 times. Lets note presents only two memory addresses from 5 shown above. and a /compat/linux/proc//maps looks like: 50000000-55c00000 rw-p 05c83000 00:00 0 55c00000-55c01000 r-xp 05c83000 00:00 0 55c01000-55c81000 rw-p 05c83000 00:00 0 55c81000-55c82000 r-xp 05c83000 00:00 0 55c82000-55c83000 rw-p 05c83000 00:00 0 So, now all from mprotect calls executing with success, but 3 memory areas still missing execute bit and oracle as effect coredumps. In linux_mmap_common there is the same trick with "prot" argument like in linux_mprotect: /* * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ bsd_args.prot = linux_args->prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; but turning on the debug for the linux_mmap_common gives no result. So linux_mmap_common not taking part in creating and changing rights of others 3 memory areas. So the question is what is the origin of this memory chunks? By calling which function there was created or managed? Maybe in this function there is place for the same hack with linux_args->prot to bsd_args.prot mapping? Thanks. Valery. From owner-freebsd-emulation@FreeBSD.ORG Sun Nov 4 12:20:43 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 1CD4F16A419 for ; Sun, 4 Nov 2007 12:20:43 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id C7F8413C4B6 for ; Sun, 4 Nov 2007 12:20:40 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 8EF76669AD0; Sun, 4 Nov 2007 13:20:25 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mtMhxyGJ1NHg; Sun, 4 Nov 2007 13:20:23 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id BFDE3669A70; Sun, 4 Nov 2007 13:20:23 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id lA4CKNEp005601; Sun, 4 Nov 2007 13:20:23 +0100 (CET) (envelope-from rdivacky) Date: Sun, 4 Nov 2007 13:20:23 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071104122023.GA5528@freebsd.org> References: <4721AB07.20708@novakom.com.ua> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472DAF60.9040008@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: Martin Cracauer , 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 12:20:43 -0000 > So, now all from mprotect calls executing with success, > but 3 memory areas still missing execute bit and oracle as effect coredumps. > In linux_mmap_common there is the same trick with "prot" argument like > in linux_mprotect: > > /* > * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC > * on Linux/i386. We do this to ensure maximum compatibility. > * Linux/ia64 does the same in i386 emulation mode. > */ > bsd_args.prot = linux_args->prot; > if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) > bsd_args.prot |= PROT_READ | PROT_EXEC; > > > but turning on the debug for the linux_mmap_common gives no result. > So linux_mmap_common not taking part in creating and changing rights of > others 3 memory areas. So the question is what is the origin of this > memory chunks? By calling which function there was created or managed? > Maybe in this function there is place for the same hack with > linux_args->prot to bsd_args.prot mapping? I am a little confused.. you are saying that 1) oracle calls m* on 0x50000000 with PROT_EXEC but fbsd does not set it on the map or 2) oracle does not set this protection at all and the OS is supposed to have set on default? roman From owner-freebsd-emulation@FreeBSD.ORG Sun Nov 4 13:25:53 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 8D3A716A417; Sun, 4 Nov 2007 13:25:53 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id F36E613C4A5; Sun, 4 Nov 2007 13:25:52 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [127.0.0.1] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id A68745C032; Sun, 4 Nov 2007 15:25:39 +0200 (EET) Message-ID: <472DC7C3.3090105@chikalov.dp.ua> Date: Sun, 04 Nov 2007 15:23:15 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <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> In-Reply-To: <20071104122023.GA5528@freebsd.org> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 071103-0, 03.11.2007), Outbound message X-Antivirus-Status: Clean 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 13:25:53 -0000 Roman Divacky пишет: > > I am a little confused.. you are saying that > > 1) oracle calls m* on 0x50000000 with PROT_EXEC but fbsd does not set it on the map > > or > > 2) oracle does not set this protection at all and the OS is supposed to have set on default? > > roman 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 0x50000000. 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 This are only addresses which are arguments for linux_mprotect. I have suspected linux_mmap_common but it not called either. Thanks. Valery. From owner-freebsd-emulation@FreeBSD.ORG Sun Nov 4 13:35:31 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 6D6F416A420 for ; Sun, 4 Nov 2007 13:35:31 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 24A2513C48E for ; Sun, 4 Nov 2007 13:35:30 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C1A2D669ADF; Sun, 4 Nov 2007 14:35:19 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sukH2X2r5zu0; Sun, 4 Nov 2007 14:35:18 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 804466698EE; Sun, 4 Nov 2007 14:35:18 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id lA4DZIQu007316; Sun, 4 Nov 2007 14:35:18 +0100 (CET) (envelope-from rdivacky) Date: Sun, 4 Nov 2007 14:35:18 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071104133518.GA7275@freebsd.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472DC7C3.3090105@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i 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 13:35:31 -0000 On Sun, Nov 04, 2007 at 03:23:15PM +0200, Valery V.Chikalov wrote: > Roman Divacky ??????????: > > > > I am a little confused.. you are saying that > > > > 1) oracle calls m* on 0x50000000 with PROT_EXEC but fbsd does not set it on the map > > > > or > > > > 2) oracle does not set this protection at all and the OS is supposed to have set on default? > > > > roman > > > 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 0x50000000. > > 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 > > This are only addresses which are arguments for linux_mprotect. > I have suspected linux_mmap_common but it not called either. the protection can be set from mmap(), can you see if there is a mmap call with 0x50....0 ? 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-- From owner-freebsd-emulation@FreeBSD.ORG Sun Nov 4 17:53:38 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 BE00F16A419; Sun, 4 Nov 2007 17:53:38 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 756AE13C4B0; Sun, 4 Nov 2007 17:53:38 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id C3BCA5C032; Sun, 4 Nov 2007 19:53:05 +0200 (EET) Message-ID: <472E067A.5050601@chikalov.dp.ua> Date: Sun, 04 Nov 2007 19:50:50 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Kostik Belousov 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> <20071104171423.GL37471@deviant.kiev.zoral.com.ua> In-Reply-To: <20071104171423.GL37471@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:53:38 -0000 Kostik Belousov wrote: [...] >>> >>> This are only addresses which are arguments for linux_mprotect. >>> I have suspected linux_mmap_common but it not called either. >> the protection can be set from mmap(), can you see if there is a mmap call 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. Yes, you are right. This issue was resolved already due to kindly help of rdivacky@. I just tried to know little more before posting the results. That is proposed by him patch: Index: vmparam.h =================================================================== RCS file: /home/ncvs/src/sys/amd64/include/vmparam.h,v retrieving revision 1.49 diff -u -r1.49 vmparam.h --- vmparam.h 25 Sep 2007 06:25:04 -0000 1.49 +++ vmparam.h 4 Nov 2007 14:43:39 -0000 @@ -45,6 +45,10 @@ #ifndef _MACHINE_VMPARAM_H_ #define _MACHINE_VMPARAM_H_ 1 +#ifdef COMPAT_IA32 +#define VM_PROT_READ_IS_EXEC /* if you can read -- then you can exec */ +#endif + /* * Machine dependent constants for AMD64. */ There are no more missing execute bits. But now I'm trying to investigate why from some time linux_ipc begin to return "-1 errno 34 Result too large", which results in oracle coredumps (as usual :-)) 1011 oracle CALL linux_ipc(0x15,0x30000,0,0xffffac08,0x50000000,0xffffac18) 1011 oracle RET linux_ipc 0 1011 oracle CALL linux_ipc(0x2,0,0x1,0x780,0,0xffffaca8) 1011 oracle RET linux_ipc 589824/0x90000 1011 oracle CALL linux_ipc(0x3,0x90000,0,0x10,0xffffac5c,0xffffaca8) 1011 oracle RET linux_ipc -1 errno 34 Result too large 1011 oracle CALL linux_ipc(0x3,0x90000,0,0x10,0xffffac5c,0xffffaca8) 1011 oracle RET linux_ipc -1 errno 34 Result too large 1011 oracle CALL linux_ipc(0x3,0x90000,0,0x10,0xffffac5c,0xffffaca8) Thank you for help. Valery. From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 5 09:51:15 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 B320116A417; Mon, 5 Nov 2007 09:51:15 +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 2A2F713C4B3; Mon, 5 Nov 2007 09:51:15 +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 1Ioybm-00042O-DD; Mon, 05 Nov 2007 11:51:02 +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 1Ioybi-0000Er-Li; Mon, 05 Nov 2007 11:51:00 +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 lA59oswM013788; Mon, 5 Nov 2007 11:50:54 +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 lA59orVi013787; Mon, 5 Nov 2007 11:50:54 +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: Mon, 5 Nov 2007 11:50:53 +0200 From: Kostik Belousov To: "Valery V.Chikalov" Message-ID: <20071105095053.GP37471@deviant.kiev.zoral.com.ua> References: <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> <20071104171423.GL37471@deviant.kiev.zoral.com.ua> <472E067A.5050601@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1Morrmav4zT5FEml" Content-Disposition: inline In-Reply-To: <472E067A.5050601@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: eacc24c597fa83a26e5f02f00d1ff66c X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1735 [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: Mon, 05 Nov 2007 09:51:15 -0000 --1Morrmav4zT5FEml Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 04, 2007 at 07:50:50PM +0200, Valery V.Chikalov wrote: > Kostik Belousov wrote: > [...] > >>> > >>>This are only addresses which are arguments for linux_mprotect. > >>>I have suspected linux_mmap_common but it not called either. > >>the protection can be set from mmap(), can you see if there is a mmap= =20 > >>call 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 th= at > >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. >=20 > Yes, you are right. >=20 > This issue was resolved already due to kindly help of rdivacky@. > I just tried to know little more before posting the results. > That is proposed by him patch: >=20 > Index: vmparam.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sys/amd64/include/vmparam.h,v > retrieving revision 1.49 > diff -u -r1.49 vmparam.h > --- vmparam.h 25 Sep 2007 06:25:04 -0000 1.49 > +++ vmparam.h 4 Nov 2007 14:43:39 -0000 > @@ -45,6 +45,10 @@ > #ifndef _MACHINE_VMPARAM_H_ > #define _MACHINE_VMPARAM_H_ 1 >=20 > +#ifdef COMPAT_IA32 > +#define VM_PROT_READ_IS_EXEC /* if you can read -- then you can exec = */ > +#endif > + No, this is wrong fix. It changes the ABI for freebsd binaries, and does this not only for SysV shm, but for any readable mapping. Instead, the following things shall be made: 1. linux_shmat() shall call kern_shmat(). 2. kern_shmat() shall take the flag that would force the read mapping to be also executable. 3. this flag shall be set when kern_shmat() is called from linux_shmat(), and not set when called from shmat(). --1Morrmav4zT5FEml Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHLud4C3+MBN1Mb4gRAoJdAJ9seBWt3+O5RyMTW/ClnQUEDRG9SACeOmsW z0usavNk8GdxjOOX6iuSskI= =ryN9 -----END PGP SIGNATURE----- --1Morrmav4zT5FEml-- From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 5 11:06:54 2007 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF02F16A503 for ; Mon, 5 Nov 2007 11:06:54 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DED0213C480 for ; Mon, 5 Nov 2007 11:06:54 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lA5B6sDW026171 for ; Mon, 5 Nov 2007 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lA5B6s2o026167 for freebsd-emulation@FreeBSD.org; Mon, 5 Nov 2007 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Nov 2007 11:06:54 GMT Message-Id: <200711051106.lA5B6s2o026167@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-emulation@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org 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, 05 Nov 2007 11:06:55 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/97326 emulation [linux] file descriptor leakage in linux emulation o kern/102956 emulation [linux] [patch] Add partial support for SO_PEERCRED in o kern/117010 emulation [linuxolator] linux_getdents() get something like buff o ports/117350 emulation compile error in emulators/vmware3 5 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/41543 emulation [patch] feature request: easier wine/w23 support o kern/55835 emulation [linux] [patch] Linux IPC emulation missing SETALL sys a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula 8 problems total. From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 5 12:42:02 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 83CA916A46B for ; Mon, 5 Nov 2007 12:42:02 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from ns.novakom.com.ua (novakom.com.ua [213.154.219.248]) by mx1.freebsd.org (Postfix) with ESMTP id CC8B813C4B8 for ; Mon, 5 Nov 2007 12:42:01 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from novakom.com.ua (post [192.168.1.254]) by ns.novakom.com.ua (Postfix) with SMTP id C9FCB1904F for ; Mon, 5 Nov 2007 14:41:38 +0200 (EET) Received: (qmail 60507 invoked by uid 0); 5 Nov 2007 12:41:38 -0000 Received: from 192.168.1.210 by post.novakom.dp.ua (envelope-from , uid 82) with qmail-scanner-1.25 (clamdscan: devel-20051128/1195. Clear:RC:1(192.168.1.210):. Processed in 0.043826 secs); 05 Nov 2007 12:41:38 -0000 X-Qmail-Scanner-Mail-From: valera@chikalov.dp.ua via post.novakom.dp.ua X-Qmail-Scanner: 1.25 (Clear:RC:1(192.168.1.210):. Processed in 0.043826 secs) Received: from goliath.novakom.dp.ua (192.168.1.210) by post.novakom.dp.ua with SMTP; 5 Nov 2007 12:41:38 -0000 Message-ID: <472F0F82.8070002@chikalov.dp.ua> Date: Mon, 05 Nov 2007 14:41:38 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070921) MIME-Version: 1.0 To: Kostik Belousov References: <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> <20071104171423.GL37471@deviant.kiev.zoral.com.ua> <472E067A.5050601@chikalov.dp.ua> <20071105095053.GP37471@deviant.kiev.zoral.com.ua> In-Reply-To: <20071105095053.GP37471@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Mon, 05 Nov 2007 12:42:02 -0000 Kostik Belousov wrote: > On Sun, Nov 04, 2007 at 07:50:50PM +0200, Valery V.Chikalov wrote: >> Kostik Belousov wrote: >> [...] >> >> Index: vmparam.h >> =================================================================== >> RCS file: /home/ncvs/src/sys/amd64/include/vmparam.h,v >> retrieving revision 1.49 >> diff -u -r1.49 vmparam.h >> --- vmparam.h 25 Sep 2007 06:25:04 -0000 1.49 >> +++ vmparam.h 4 Nov 2007 14:43:39 -0000 >> @@ -45,6 +45,10 @@ >> #ifndef _MACHINE_VMPARAM_H_ >> #define _MACHINE_VMPARAM_H_ 1 >> >> +#ifdef COMPAT_IA32 >> +#define VM_PROT_READ_IS_EXEC /* if you can read -- then you can exec */ >> +#endif >> + > No, this is wrong fix. It changes the ABI for freebsd binaries, and does > this not only for SysV shm, but for any readable mapping. > > Instead, the following things shall be made: Thanks, will try to do it this way. But, just for curiosity and for my education. My point from teh beginning was: we must find differences between linux emulations in __i386__ and __amd64__(dont take it too literally, I dont mean diff /sys/i386/xxx /sys/amd64/xxx :-)), because oracle is running perfectly in __i386__ mode and failed to run in __amd64__. On the first glance such difference was found: VM_PROT_READ_IS_EXEC is defined in /sys/[i386|arm]/include/vmparam.h but not in /sys/amd64/include/vmparam.h. But: 1) you claim that this is wrong. So, why? Why this is right for i386|arm and wrong for amd64. > 1. linux_shmat() shall call kern_shmat(). > 2. kern_shmat() shall take the flag that would force the read mapping > to be also executable. > 3. this flag shall be set when kern_shmat() is called from linux_shmat(), > and not set when called from shmat(). Why this is not applicable to i386 mode? 2) in practice it prove to be useless, i.e. though we have made that execution bits are present now, but oracle behavior is the same as in case when I just skipped forced setting execution bit to allow mprotect call return 0. So possibly, this is not the difference we need to find. So, again, what are the main known differences between __i386__ and __amd64__ from "application point of view"? Oracle + linux libs are just user mode application, right? Sorry, if I ask too much. For now I was able to found 1) mention that AMD64 platform is currently a Tier 1 FreeBSD platform. 2) current FreeBSD problem reports for AMD64. 3) http://wiki.freebsd.org/linux-kernel/ltp (Linux Test Project) Thanks. Valery. P.S. If my questions looks like criticism its not. In our company we have about 100 computers with installed FreeBSD with versions from 4.0 to 8.0. In FreeBSD advocacy I'm more saint then Pope :-) From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 5 13:46:42 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 D10A416A418; Mon, 5 Nov 2007 13:46:42 +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 42E6613C4B3; Mon, 5 Nov 2007 13:46:42 +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 1Ip1Zp-000NDK-O7; Mon, 05 Nov 2007 15:01:13 +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 1Ip1Zm-000Iwy-5e; Mon, 05 Nov 2007 15:01:12 +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 lA5D17E4034801; Mon, 5 Nov 2007 15:01:07 +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 lA5D16Us034800; Mon, 5 Nov 2007 15:01:06 +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: Mon, 5 Nov 2007 15:01:06 +0200 From: Kostik Belousov To: "Valery V.Chikalov" Message-ID: <20071105130106.GQ37471@deviant.kiev.zoral.com.ua> References: <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> <20071104171423.GL37471@deviant.kiev.zoral.com.ua> <472E067A.5050601@chikalov.dp.ua> <20071105095053.GP37471@deviant.kiev.zoral.com.ua> <472F0F82.8070002@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GuCODRLlE2VjZS/b" Content-Disposition: inline In-Reply-To: <472F0F82.8070002@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: b72b012eade34d4806fecc225a7d7ed8 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1735 [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: Mon, 05 Nov 2007 13:46:43 -0000 --GuCODRLlE2VjZS/b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 05, 2007 at 02:41:38PM +0200, Valery V.Chikalov wrote: > Kostik Belousov wrote: > >On Sun, Nov 04, 2007 at 07:50:50PM +0200, Valery V.Chikalov wrote: > >>Kostik Belousov wrote: > >>[...] > >> > >>Index: vmparam.h > >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >>RCS file: /home/ncvs/src/sys/amd64/include/vmparam.h,v > >>retrieving revision 1.49 > >>diff -u -r1.49 vmparam.h > >>--- vmparam.h 25 Sep 2007 06:25:04 -0000 1.49 > >>+++ vmparam.h 4 Nov 2007 14:43:39 -0000 > >>@@ -45,6 +45,10 @@ > >> #ifndef _MACHINE_VMPARAM_H_ > >> #define _MACHINE_VMPARAM_H_ 1 > >> > >>+#ifdef COMPAT_IA32 > >>+#define VM_PROT_READ_IS_EXEC /* if you can read -- then you can exe= c=20 > >>*/ > >>+#endif > >>+ > >No, this is wrong fix. It changes the ABI for freebsd binaries, and does > >this not only for SysV shm, but for any readable mapping. > > > >Instead, the following things shall be made: >=20 > Thanks, will try to do it this way. >=20 > But, just for curiosity and for my education. >=20 > My point from teh beginning was: we must find differences between linux= =20 > emulations in __i386__ and __amd64__(dont take it too literally, I dont= =20 > mean diff /sys/i386/xxx /sys/amd64/xxx :-)), because oracle is running=20 > perfectly in __i386__ mode and failed to run in __amd64__. >=20 > On the first glance such difference was found: VM_PROT_READ_IS_EXEC is=20 > defined in /sys/[i386|arm]/include/vmparam.h but not in=20 > /sys/amd64/include/vmparam.h. AMD64 (and, in fact, some i386, when running in PAE mode) has so-called execution-disable bit in the page protection attributes. The patch would make the PROT_READ =3D=3D PROT_READ | PROT_EXEC unconditionally. >=20 > But: > 1) you claim that this is wrong. > So, why? Why this is right for i386|arm and wrong for amd64. >=20 > > 1. linux_shmat() shall call kern_shmat(). > > 2. kern_shmat() shall take the flag that would force the read mapping > > to be also executable. > > 3. this flag shall be set when kern_shmat() is called from linux_shmat(= ), > > and not set when called from shmat(). >=20 > Why this is not applicable to i386 mode? Good question, I did not looked into the details of handling PROT_EXEC on i386 when nx bit is supported. FreeBSD definitely ignores PT_GNU_STACK for non-executable stacks, I am not sure what could break with this on i386. --GuCODRLlE2VjZS/b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHLxQRC3+MBN1Mb4gRAqTMAKCroUU1OC9jv1GFVIsUnmOYTEvHhwCgwtOn jx+2sD5eRBGzKpTHTklOTsg= =LITX -----END PGP SIGNATURE----- --GuCODRLlE2VjZS/b-- From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 5 15:37:33 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 2BBBD16A46C for ; Mon, 5 Nov 2007 15:37:33 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id C6D6213C4B5 for ; Mon, 5 Nov 2007 15:37:32 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id F02E0669B48; Mon, 5 Nov 2007 16:37:17 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 62sGxx8Evg+a; Mon, 5 Nov 2007 16:37:17 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 0BAAF669AE5; Mon, 5 Nov 2007 16:37:17 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id lA5FbEir052398; Mon, 5 Nov 2007 16:37:14 +0100 (CET) (envelope-from rdivacky) Date: Mon, 5 Nov 2007 16:37:14 +0100 From: Roman Divacky To: Kostik Belousov Message-ID: <20071105153714.GA52292@freebsd.org> References: <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> <20071104171423.GL37471@deviant.kiev.zoral.com.ua> <472E067A.5050601@chikalov.dp.ua> <20071105095053.GP37471@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071105095053.GP37471@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i 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: Mon, 05 Nov 2007 15:37:33 -0000 > No, this is wrong fix. It changes the ABI for freebsd binaries, and does > this not only for SysV shm, but for any readable mapping. yes.. the patch is wrong > Instead, the following things shall be made: > 1. linux_shmat() shall call kern_shmat(). > 2. kern_shmat() shall take the flag that would force the read mapping > to be also executable. > 3. this flag shall be set when kern_shmat() is called from linux_shmat(), > and not set when called from shmat(). that sounds about correct. but I think it should cover 32bit fbsd binaries running on amd64 as well.. roman From owner-freebsd-emulation@FreeBSD.ORG Mon Nov 5 21:24:02 2007 Return-Path: Delivered-To: emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F7816A418 for ; Mon, 5 Nov 2007 21:24:02 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id DE51913C48A for ; Mon, 5 Nov 2007 21:24:01 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp85-141-133-162.pppoe.mtu-net.ru [85.141.133.162]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTP id AF5F2242F828; Mon, 5 Nov 2007 23:46:49 +0300 (MSK) Date: Mon, 5 Nov 2007 23:46:47 +0300 From: Andrew Pantyukhin To: emulation@FreeBSD.org Message-ID: <20071105204645.GE64094@amilo.cenkes.org> References: <20071103210632.GB72327@amilo.cenkes.org> <1194124724.10479.35.camel@ikaros.oook.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1194124724.10479.35.camel@ikaros.oook.cz> X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.16 (2007-06-09) Cc: portmgr@FreeBSD.org Subject: linux-pango/cairo vs firefox/seamonkey/flock X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 21:24:02 -0000 On Sat, Nov 03, 2007 at 10:18:44PM +0100, Pav Lucistnik wrote: > Andrew Pantyukhin p=C3=AD=C5=A1e v ne 04. 11. 2007 v 00:06 +0300: <...> > > Also, I can't update these ports at the moment: > > linux-firefox-devel > > linux-seamonkey-devel > > linux-flock > > since they depend on libpangocairo, which is not available in fc4 > > linux environment right now. Firefox and seamonkey are affected > > by several hairy advisories, apparently so is flock. I'd like to > > mark them forbidden until I come up with a solution, which may > > not happen before the freeze is over. > > Approved. It turned out gstreamer/freedesktop guys distribute an updated version of pango and cairo for fc4. I tested popular linux ports that depend on linux-pango (acroread, sunbird, thunderbird, firefox, nvu, nero, realplayer, flock, seamonkey, mplayerplugin) and they all worked without any trouble with the new version. The only real reason to do this during a freeze is that firefox-/seamonkey-devel and flock cannot be updated otherwise, and they are affected by several security advisories. But none of them are very popular ports, so if you think that marking them forbidden is better, I'll have no objection. Here's the diffs: http://heka.cenkes.org/sat/diffs/linux-pango.cairo.diff http://heka.cenkes.org/sat/diffs/linux-cairo.diff From owner-freebsd-emulation@FreeBSD.ORG Wed Nov 7 22:33:44 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 1FFA316A46D for ; Wed, 7 Nov 2007 22:33:44 +0000 (UTC) (envelope-from alex.kovalenko@verizon.net) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by mx1.freebsd.org (Postfix) with ESMTP id F157913C4D1 for ; Wed, 7 Nov 2007 22:33:43 +0000 (UTC) (envelope-from alex.kovalenko@verizon.net) Received: from [10.0.3.231] ([70.21.144.51]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JR5002XQQNRTJX9@vms042.mailsrvcs.net> for freebsd-emulation@freebsd.org; Wed, 07 Nov 2007 16:33:29 -0600 (CST) Date: Wed, 07 Nov 2007 17:33:00 -0500 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <200711072141.lA7LfEwH073891@saturn.kn-bremen.de> To: Juergen Lock Message-id: <1194474780.2904.33.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <200711072141.lA7LfEwH073891@saturn.kn-bremen.de> Cc: freebsd-emulation@freebsd.org, aryeh.friedman@gmail.com Subject: Re: using a raw disk for qemu image 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: Wed, 07 Nov 2007 22:33:44 -0000 On Wed, 2007-11-07 at 22:41 +0100, Juergen Lock wrote: > In article <473016F5.80209@gmail.com> you write: > >I know this is not a FreeBSD question persay but if I have XP installed > >on an other drive and want to access it with qemu what is the command > >line for qemu of qemu-img to enable this... before anyone asks I am not > >using wine because it doesn't run on amd54 > > Well theoreticall that would be qemu -hda /dev/ad1 (or wherever that other > drive is), but in this case its unlikely to work since Windows doesn't > like hardware being changed under it (the hardware qemu emulates > most likely is different from the one your real system.) You can read > more about this topic in the freenode #qemu faq: > http://calamari.reverse-dns.net:980/cgi-bin/moin.cgi/FrequentlyAskedQuestions#head-bcc0d7a7641ec611dbe969aa9b8d433e2fc0b903 > > HTH, > Juergen > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" Having done something like that with VMWare, here are two observations: -- create hardware profiles in Windows for real boot and one with VMWare^H^H^H^H^H^qemu (AFAICR this could be found someplace around Device Manager tab in the System applet in the Control Panel). -- you might be required to register your Windows XP installation every time you switch from VM to real boot. I have not found solution to this problem and was able to rid myself of Windows in the allowed 60 days. Windows versions prior to XP do not require registration. Moved to freebsd-emulation as it seems more appropriate to the topic. -- Alexandre "Sunny" Kovalenko From owner-freebsd-emulation@FreeBSD.ORG Thu Nov 8 14:44:25 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 47CF316A419 for ; Thu, 8 Nov 2007 14:44:25 +0000 (UTC) (envelope-from cokane@freebsd.org) Received: from QMTA07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id 22A8E13C4DD for ; Thu, 8 Nov 2007 14:44:25 +0000 (UTC) (envelope-from cokane@freebsd.org) Received: from OMTA05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by QMTA07.emeryville.ca.mail.comcast.net with smtp id ADRh1Y0060vp7WL0104400; Thu, 08 Nov 2007 14:27:41 +0000 Received: from discordia ([24.60.136.97]) by OMTA05.emeryville.ca.mail.comcast.net with comcast id AETg1Y00A26FYqY0000000; Thu, 08 Nov 2007 14:27:41 +0000 X-Authority-Analysis: v=1.0 c=1 a=8rptStq6LJUQjGE8-mUA:9 a=KIbmI--5cv973cK0EgFugmQPChIA:4 a=b8hG5vVbyAkA:10 Received: by discordia (Postfix, from userid 103) id DCAF11634F7; Thu, 8 Nov 2007 09:27:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8-gr1 Received: from [172.20.1.3] (unknown [172.20.1.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id A48871634F6 for ; Thu, 8 Nov 2007 09:27:23 -0500 (EST) Message-ID: <47331C2F.7090506@FreeBSD.org> Date: Thu, 08 Nov 2007 09:24:47 -0500 From: Coleman Kane Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.6 (X11/20071104) MIME-Version: 1.0 To: freebsd-emulation@FreeBSD.org X-Enigmail-Version: 0.96a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: NDIS wrapper driver compatibility X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cokane@FreeBSD.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2007 14:44:25 -0000 Hello, I recently got an HP Compaq 6715b notebook with a Broadcom BCM94321 draft-n wifi adapter in it. I am moving from a Gateway 7422GX with the BCM4306 b+g card in it. Both of these are amd64 notebooks. When I first set up the Gateway, the card of course didn't work. I tried the drivers from Gateway's site, but they ended up tossing a kernel panic. I went through other drivers until I finally came across some that Jung-uk Kim had gotten to work, and these have been working fine on the Gateway. Since getting the HP, I have been very determined to get FreeBSD working on it. So I spent the past two days scouring the 'net for different releases of the Win64 drivers compatible with my card (device ID 0x4328). After going through like 10 different drivers, and even manually adding the device id's to .inf files, I finally found a driver that actually gets the draft-n card to work under the amd64 NDIS wrapper. I am curious if there is any effort to document these successes. It seems that there are as many "live" driver revisions in the wild as there are hardware combinations (perhaps more!). For anyone who's not as determined as I (to spend two days on it), it would be really cool to have a project (in the wiki for instance) that tracks successful driver revisions, as well as being a central point to document and resolve failures. I intend to put the driver .inf, .sys, and .ko up on my site (which already has some documentation about getting FreeBSD/amd64 working on the Gateway and a similar Compaq R3000), but I only have three examples to demo. I would much rather pair this up with a community-based site with a larger scope. -- Coleman Kane From owner-freebsd-emulation@FreeBSD.ORG Thu Nov 8 21:27:13 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 C47CA16A41A for ; Thu, 8 Nov 2007 21:27:13 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [194.62.233.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7B12113C4A5 for ; Thu, 8 Nov 2007 21:27:13 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from sp34.ipt.ru ([194.62.233.107] helo=bs1.sp34.ru) by mail.ipt.ru with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1IqELU-000CSb-Hl; Thu, 08 Nov 2007 23:51:24 +0300 Received: from bsam by bs1.sp34.ru with local (Exim 4.63 (FreeBSD)) (envelope-from ) id 1IqENz-0002Gf-Jv; Thu, 08 Nov 2007 23:53:59 +0300 To: Ion-Mihai Tetcu References: <20070615203411.8139.qmail@mail.integrity.hu> <67772807@serv3.int.kfs.ru> <20070618204430.69143c97@deskjail> <20070716094955.3e6bf069@it.buh.tecnik93.com> From: Boris Samorodov Date: Thu, 08 Nov 2007 23:53:59 +0300 In-Reply-To: <20070716094955.3e6bf069@it.buh.tecnik93.com> (Ion-Mihai Tetcu's message of "Mon, 16 Jul 2007 09:49:55 +0300") Message-ID: <40923896@bs1.sp34.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Leidinger , Zahemszky Gabor , freebsd-emulation@FreeBSD.org Subject: Re: linux-nero on freebsd does not work :-( 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: Thu, 08 Nov 2007 21:27:13 -0000 On Mon, 16 Jul 2007 09:49:55 +0300 Ion-Mihai Tetcu wrote: > On Mon, 18 Jun 2007 20:44:30 +0200 > Alexander Leidinger wrote: > > Quoting Boris Samorodov (Mon, 18 Jun 2007 18:11:52 > > +0400): > > > On Fri, 15 Jun 2007 22:34:11 +0200 Zahemszky Gabor wrote: > > > > > > > I'd like to try your Linux-Nero port on my FreeBSD machines. All > > > > of them (2 laptops and a desktop machine) failed: nero started, I > > > > have to accept the licence, an after it type my name/company and > > > > serial number. > > > > But in that page, I cannot click on the OK button, but only on > > > > Cancel. I think, the licence code is a a demo licence, and it > > > > should > > > > > > I think you should buy a valid key. It was allowed to use linux-nero > > > beta version without a valid key (imo). > > > > Note, the button is not greyed out on -current... > On 7.0-CURRENT #0: Thu Jul 12 20:31:29 EEST 2007 it is. Well, it's funny. ;-) My bank changed the company which process credit cards. And only after that I managed to pay for a valid key. I install the port, copy&paste the key and button becomes valid. And do you know what? It so happens that I read the very first (top) phrase: "Evaluation period expirited"... Only now do I understand why the button with a demo licence is greylisted. ;-) WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sat Nov 10 16:28:33 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 3E03616A418; Sat, 10 Nov 2007 16:28:33 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from rusty.kulnet.kuleuven.ac.be (rusty.kulnet.kuleuven.ac.be [134.58.240.42]) by mx1.freebsd.org (Postfix) with ESMTP id E7F1413C4C4; Sat, 10 Nov 2007 16:28:32 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from localhost (localhost [127.0.0.1]) by rusty.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 521961D76BA; Sat, 10 Nov 2007 17:10:50 +0100 (CET) Received: from smtps01.kuleuven.be (smtpshost01.kulnet.kuleuven.be [134.58.240.74]) by rusty.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 110151D7606; Sat, 10 Nov 2007 17:10:49 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtps01.kuleuven.be (Postfix) with ESMTP id EFFAE31E702; Sat, 10 Nov 2007 17:10:48 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.1/8.14.1) with ESMTP id lAAGAmN0004415; Sat, 10 Nov 2007 17:10:48 +0100 (CET) (envelope-from tijl@ulyssis.org) X-Kuleuven: This mail passed the K.U.Leuven mailcluster From: Tijl Coosemans To: Stephen Montgomery-Smith Date: Sat, 10 Nov 2007 17:10:45 +0100 User-Agent: KMail/1.9.7 References: <4735CB58.7070703@math.missouri.edu> In-Reply-To: <4735CB58.7070703@math.missouri.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711101710.47357.tijl@ulyssis.org> X-Virus-Scanned: by KULeuven Antivirus Cluster Cc: freebsd-emulation@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Trouble running Mathematica 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: Sat, 10 Nov 2007 16:28:33 -0000 On Saturday 10 November 2007 16:16:40 Stephen Montgomery-Smith wrote: > When I run Mathematica 5.2 on FreeBSD RELENG_7 I get the following > message: > > /usr/local/mma52/SystemFiles/Kernel/Binaries/Linux/MathKernel: error > while loading shared libraries: /usr/lib/librt.so.1: ELF file OS ABI > invalid If you have linux_base-fc4, creating the following link should fix it: ln -s ../../lib/librt-2.3.6.so /compat/linux/usr/lib/librt.so.1 This is something that should have been added to the linux_base-fc4 package long time ago, but I guess it got lost. CC'ed to maintainer. The same error appears when you run /compat/linux/bin/ls. From owner-freebsd-emulation@FreeBSD.ORG Sat Nov 10 16:30:38 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 84E4216A468; Sat, 10 Nov 2007 16:30:38 +0000 (UTC) (envelope-from redmail@cauchy.math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 4B16113C4A3; Sat, 10 Nov 2007 16:30:38 +0000 (UTC) (envelope-from redmail@cauchy.math.missouri.edu) Received: from cauchy.math.missouri.edu (localhost [127.0.0.1]) by cauchy.math.missouri.edu (8.14.1/8.14.1) with ESMTP id lAAGHfQq011322; Sat, 10 Nov 2007 10:17:41 -0600 (CST) (envelope-from redmail@cauchy.math.missouri.edu) Received: (from redmail@localhost) by cauchy.math.missouri.edu (8.14.1/8.14.1/Submit) id lAAGHfkr011321; Sat, 10 Nov 2007 10:17:41 -0600 (CST) (envelope-from redmail) Date: Sat, 10 Nov 2007 10:17:40 -0600 From: Stephen Montgomery-Smith To: Tijl Coosemans Message-ID: <20071110161740.GB11049@cauchy.math.missouri.edu> References: <4735CB58.7070703@math.missouri.edu> <200711101710.47357.tijl@ulyssis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200711101710.47357.tijl@ulyssis.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@FreeBSD.org, freebsd-stable@FreeBSD.org Subject: Re: Trouble running Mathematica 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: Sat, 10 Nov 2007 16:30:38 -0000 On Sat, Nov 10, 2007 at 05:10:45PM +0100, Tijl Coosemans wrote: > On Saturday 10 November 2007 16:16:40 Stephen Montgomery-Smith wrote: > > When I run Mathematica 5.2 on FreeBSD RELENG_7 I get the following > > message: > > > > /usr/local/mma52/SystemFiles/Kernel/Binaries/Linux/MathKernel: error > > while loading shared libraries: /usr/lib/librt.so.1: ELF file OS ABI > > invalid > > If you have linux_base-fc4, creating the following link should fix it: > > ln -s ../../lib/librt-2.3.6.so /compat/linux/usr/lib/librt.so.1 > > This is something that should have been added to the linux_base-fc4 > package long time ago, but I guess it got lost. CC'ed to maintainer. > The same error appears when you run /compat/linux/bin/ls. Another great solution!