From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 18:43:27 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 8879A16A41A for ; Sun, 28 Oct 2007 18:43:27 +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 BA14413C4C6 for ; Sun, 28 Oct 2007 18:43:23 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A42CD669519; Sun, 28 Oct 2007 19:43:20 +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 Qz2NbHJJKhO8; Sun, 28 Oct 2007 19:43:19 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5AF54669518; Sun, 28 Oct 2007 19:43:19 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l9SIhJ0U057317; Sun, 28 Oct 2007 19:43:19 +0100 (CET) (envelope-from rdivacky) Date: Sun, 28 Oct 2007 19:43:18 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071028184318.GA57240@freebsd.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4724D99C.3080105@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, 28 Oct 2007 18:43:27 -0000 On Sun, Oct 28, 2007 at 08:49:00PM +0200, Valery V.Chikalov wrote: > Valery V.Chikalov wrote: > >Roman Divacky wrote: > >>> > >>>and got something like: > >>> > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 > >>>Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 > >>>Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 > >>> > >>>where 13 is EACCES. > >> > >>can you show what are the "prot" and "len" arguments? Index: linux_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/linux/linux_machdep.c,v retrieving revision 1.78 diff -u -r1.78 linux_machdep.c --- linux_machdep.c 20 Jul 2007 08:35:18 -0000 1.78 +++ linux_machdep.c 28 Oct 2007 18:42:15 -0000 @@ -803,8 +803,10 @@ bsd_args.addr = uap->addr; bsd_args.len = uap->len; bsd_args.prot = uap->prot; +#if 0 if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; +#endif return (mprotect(td, &bsd_args)); } does this help?