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 :-)