From owner-freebsd-emulation@FreeBSD.ORG Sun Feb 17 16:29:44 2008 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 01FD416A41A for ; Sun, 17 Feb 2008 16:29:44 +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 B6AA813C45D for ; Sun, 17 Feb 2008 16:29:43 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3EF0D674C63 for ; Sun, 17 Feb 2008 17:29:41 +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 hI3o3+xfXRhs for ; Sun, 17 Feb 2008 17:29:39 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4EC1C674C4F for ; Sun, 17 Feb 2008 17:29:39 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m1HGTcDi083041 for emulation@freebsd.org; Sun, 17 Feb 2008 17:29:38 +0100 (CET) (envelope-from rdivacky) Date: Sun, 17 Feb 2008 17:29:38 +0100 From: Roman Divacky To: emulation@freebsd.org Message-ID: <20080217162938.GA82845@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: epoll patch for review 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, 17 Feb 2008 16:29:44 -0000 hi www.vlakno.cz/~rdivacky/linux_epoll.patch patch that implements epoll() in linuxulator. its fairly trivial so I'd love to get this reviewed/commited by someone. it's basically a thin translation layer above kqueue. I tested this using http://www.vlakno.cz/~rdivacky/epoll.c it seems to work for me please take a look at it someone. I dont want it to rott and be forgotten. thank you roman p.s. this is from my Summer of Code 2007, ie. funded by Google, thnx G! From owner-freebsd-emulation@FreeBSD.ORG Sun Feb 17 16:32:31 2008 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 F3CAB16A417 for ; Sun, 17 Feb 2008 16:32:30 +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 B3B3313C447 for ; Sun, 17 Feb 2008 16:32:30 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id AC703674C4F for ; Sun, 17 Feb 2008 17:32:29 +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 ijyeDEvX+xqo for ; Sun, 17 Feb 2008 17:32:28 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 75A4B674C65 for ; Sun, 17 Feb 2008 17:32:28 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m1HGWS92083153 for emulation@freebsd.org; Sun, 17 Feb 2008 17:32:28 +0100 (CET) (envelope-from rdivacky) Date: Sun, 17 Feb 2008 17:32:28 +0100 From: Roman Divacky To: emulation@freebsd.org Message-ID: <20080217163228.GA83107@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: [PATCH]: mremap() trivial fixes 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, 17 Feb 2008 16:32:31 -0000 hi www.vlakno.cz/~rdivacky/linux_misc.patch fixes two trivial issues with mremap(). it sanitizes the input params a little thus fixing two LTP fails please commit thnx, roman From owner-freebsd-emulation@FreeBSD.ORG Sun Feb 17 19:39:56 2008 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 C7E9C16A420; Sun, 17 Feb 2008 19:39:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 6C8EE13C44B; Sun, 17 Feb 2008 19:39:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JQpMf-0007xJ-7K; Sun, 17 Feb 2008 21:39:55 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id m1HJdS8g062897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Feb 2008 21:39:29 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m1HJdoYv053644; Sun, 17 Feb 2008 21:39:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m1HJdokQ053643; Sun, 17 Feb 2008 21:39:50 +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, 17 Feb 2008 21:39:50 +0200 From: Kostik Belousov To: Roman Divacky Message-ID: <20080217193950.GQ57756@deviant.kiev.zoral.com.ua> References: <20080217163228.GA83107@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cqW2X8lxSI584AE/" Content-Disposition: inline In-Reply-To: <20080217163228.GA83107@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 7ffaa6bc246e67c9b1a22e0c753f4a43 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 2246 [Feb 15 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {TO: local part of email appears in body} X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 9 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: emulation@freebsd.org Subject: Re: [PATCH]: mremap() trivial fixes 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, 17 Feb 2008 19:39:56 -0000 --cqW2X8lxSI584AE/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 17, 2008 at 05:32:28PM +0100, Roman Divacky wrote: > hi >=20 > www.vlakno.cz/~rdivacky/linux_misc.patch >=20 > fixes two trivial issues with mremap(). it sanitizes > the input params a little thus fixing two LTP fails >=20 > please commit Please, supply the commit message. Also, the comment about Linux/FreeBSD meaning of the PAGE_MASK shall be adjusted to describe the reason for the check first (I suggest simply add the "Check for the page alignment" there). --cqW2X8lxSI584AE/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAke4jYUACgkQC3+MBN1Mb4gSKQCgolbcMfwkA7yLWU8hZN/Xkr8h D24AoM2SUuWfHZlb3LYrOmPQbTy5divZ =TwIN -----END PGP SIGNATURE----- --cqW2X8lxSI584AE/-- From owner-freebsd-emulation@FreeBSD.ORG Mon Feb 18 11:07:06 2008 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 C6FB816A469 for ; Mon, 18 Feb 2008 11:07:06 +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 B594513C4CE for ; Mon, 18 Feb 2008 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1IB76cF039361 for ; Mon, 18 Feb 2008 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1IB76WZ039357 for freebsd-emulation@FreeBSD.org; Mon, 18 Feb 2008 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Feb 2008 11:07:06 GMT Message-Id: <200802181107.m1IB76WZ039357@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, 18 Feb 2008 11:07:06 -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] [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 o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too 9 problems total. From owner-freebsd-emulation@FreeBSD.ORG Tue Feb 19 21:52:13 2008 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 E577716A419 for ; Tue, 19 Feb 2008 21:52:13 +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 A05AD13C4CE for ; Tue, 19 Feb 2008 21:52:12 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4F4C9674FB5; Tue, 19 Feb 2008 22:52:11 +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 FSLiHnJTH9Dz; Tue, 19 Feb 2008 22:51:56 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4A9D2674E7E; Tue, 19 Feb 2008 22:51:56 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m1JLptA8034502; Tue, 19 Feb 2008 22:51:55 +0100 (CET) (envelope-from rdivacky) Date: Tue, 19 Feb 2008 22:51:55 +0100 From: Roman Divacky To: Kostik Belousov Message-ID: <20080219215155.GA34405@freebsd.org> References: <20080217163228.GA83107@freebsd.org> <20080217193950.GQ57756@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080217193950.GQ57756@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: emulation@freebsd.org Subject: Re: [PATCH]: mremap() trivial fixes 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: Tue, 19 Feb 2008 21:52:14 -0000 On Sun, Feb 17, 2008 at 09:39:50PM +0200, Kostik Belousov wrote: > On Sun, Feb 17, 2008 at 05:32:28PM +0100, Roman Divacky wrote: > > hi > > > > www.vlakno.cz/~rdivacky/linux_misc.patch > > > > fixes two trivial issues with mremap(). it sanitizes > > the input params a little thus fixing two LTP fails > > > > please commit > > Please, supply the commit message. > Also, the comment about Linux/FreeBSD meaning of the PAGE_MASK shall be > adjusted to describe the reason for the check first (I suggest simply > add the "Check for the page alignment" there). commit message: Sanitize arguments to linux_mremap(). Check for MREMAP_FIXED and MREMAP_MAYMOVE flags being mutually exclusive and page alignment of addr argument. and I fully agree with the change of the comment. please commit. thnx a lot roman From owner-freebsd-emulation@FreeBSD.ORG Fri Feb 22 21:20:03 2008 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 F1F4D16A403 for ; Fri, 22 Feb 2008 21:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EB5B613C455 for ; Fri, 22 Feb 2008 21:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1MLK3qp012524 for ; Fri, 22 Feb 2008 21:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1MLK340012523; Fri, 22 Feb 2008 21:20:03 GMT (envelope-from gnats) Date: Fri, 22 Feb 2008 21:20:03 GMT Message-Id: <200802222120.m1MLK340012523@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Volker Cc: Subject: Re: kern/73777: [linux] [patch] linux emulation: root dir special handling useless and harmful X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Volker List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 21:20:04 -0000 The following reply was made to PR kern/73777; it has been noted by GNATS. From: Volker To: bug-followup@FreeBSD.org, avg@icyb.net.ua Cc: Subject: Re: kern/73777: [linux] [patch] linux emulation: root dir special handling useless and harmful Date: Fri, 22 Feb 2008 22:16:02 +0100 Andriy, I'm sorry to see your PR being in GNATS for years. I've checked your issue and was not able to get your patch into sync with current RELENG_7 sources. I'm wondering if you're still thinking, the issue is real and am willing to send in new patches? If you think this issue has been solved in the meantime, please report back so we can close this PR. Thanks! From owner-freebsd-emulation@FreeBSD.ORG Sat Feb 23 03:10:39 2008 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 7282816A419; Sat, 23 Feb 2008 03:10:39 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4727B13C4D1; Sat, 23 Feb 2008 03:10:39 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1N3Adhh041253; Sat, 23 Feb 2008 03:10:39 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1N3AcQY041249; Sat, 23 Feb 2008 03:10:38 GMT (envelope-from linimon) Date: Sat, 23 Feb 2008 03:10:38 GMT Message-Id: <200802230310.m1N3AcQY041249@freefall.freebsd.org> To: avg@icyb.net.ua, linimon@FreeBSD.org, freebsd-emulation@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/73777: [linux] [patch] linux emulation: root dir special handling useless and harmful 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, 23 Feb 2008 03:10:39 -0000 Synopsis: [linux] [patch] linux emulation: root dir special handling useless and harmful State-Changed-From-To: open->feedback State-Changed-By: linimon State-Changed-When: Sat Feb 23 03:10:25 UTC 2008 State-Changed-Why: Note that submitter has been asked for feedback. http://www.freebsd.org/cgi/query-pr.cgi?pr=73777 From owner-freebsd-emulation@FreeBSD.ORG Sat Feb 23 07:50:03 2008 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 0894116A401 for ; Sat, 23 Feb 2008 07:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E043B13C448 for ; Sat, 23 Feb 2008 07:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1N7o2vG066698 for ; Sat, 23 Feb 2008 07:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1N7o2qv066693; Sat, 23 Feb 2008 07:50:02 GMT (envelope-from gnats) Date: Sat, 23 Feb 2008 07:50:02 GMT Message-Id: <200802230750.m1N7o2qv066693@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/73777: [linux] [patch] linux emulation: root dir special handling useless and harmful X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 07:50:03 -0000 The following reply was made to PR kern/73777; it has been noted by GNATS. From: Andriy Gapon To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/73777: [linux] [patch] linux emulation: root dir special handling useless and harmful Date: Sat, 23 Feb 2008 09:46:53 +0200 This is a multi-part message in MIME format. --------------080104050205040809080106 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Well, I think that the issue described in this PR still holds. On the other hand, I now think that some people might still prefer current behavior over what I suggest. There could be some POLA concerns too. Another concern is that now the code is common to all emulation, so it's not linux specific anymore. In any case, I am attaching a patch that I currently use. -- Andriy Gapon --------------080104050205040809080106 Content-Type: text/x-patch; name="rootdir-6.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rootdir-6.patch" --- sys/kern/vfs_lookup.c.orig Fri May 12 16:03:41 2006 +++ sys/kern/vfs_lookup.c Fri May 12 16:09:31 2006 @@ -955,7 +955,7 @@ kern_alternate_path(struct thread *td, const char *prefix, char *path, enum uio_seg pathseg, char **pathbuf, int create) { - struct nameidata nd, ndroot; + struct nameidata nd; char *ptr, *buf, *cp; size_t len, sz; int error; @@ -1014,28 +1014,6 @@ error = namei(&nd); if (error != 0) goto keeporig; - - /* - * We now compare the vnode of the prefix to the one - * vnode asked. If they resolve to be the same, then we - * ignore the match so that the real root gets used. - * This avoids the problem of traversing "../.." to find the - * root directory and never finding it, because "/" resolves - * to the emulation root directory. This is expensive :-( - */ - NDINIT(&ndroot, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, prefix, - td); - - /* We shouldn't ever get an error from this namei(). */ - error = namei(&ndroot); - if (error == 0) { - if (nd.ni_vp == ndroot.ni_vp) - error = ENOENT; - - NDFREE(&ndroot, NDF_ONLY_PNBUF); - vrele(ndroot.ni_vp); - VFS_UNLOCK_GIANT(NDHASGIANT(&ndroot)); - } } NDFREE(&nd, NDF_ONLY_PNBUF); --------------080104050205040809080106-- From owner-freebsd-emulation@FreeBSD.ORG Sat Feb 23 13:46:41 2008 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 3775316A400 for ; Sat, 23 Feb 2008 13:46:41 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id D9CBE13C465 for ; Sat, 23 Feb 2008 13:46:40 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A56C92.dip.t-dialin.net [84.165.108.146]) by redbull.bpaserver.net (Postfix) with ESMTP id 50C4E2E357; Sat, 23 Feb 2008 14:46:28 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id E7B807DD9E; Sat, 23 Feb 2008 14:46:24 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m1NDkNva079902; Sat, 23 Feb 2008 14:46:23 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from ADijon-259-1-40-112.w90-33.abo.wanadoo.fr (ADijon-259-1-40-112.w90-33.abo.wanadoo.fr [90.33.107.112]) by webmail.leidinger.net (Horde MIME library) with HTTP; Sat, 23 Feb 2008 14:46:23 +0100 Message-ID: <20080223144623.p2xcexyu0wcgwskk@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Sat, 23 Feb 2008 14:46:23 +0100 From: Alexander Leidinger To: Andriy Gapon References: <200802230750.m1N7o2qv066693@freefall.freebsd.org> In-Reply-To: <200802230750.m1N7o2qv066693@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.5) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.7, required 6, BAYES_00 -15.00, MR_NOT_ATTRIBUTED_IP 0.20, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-emulation@FreeBSD.org Subject: Re: kern/73777: [linux] [patch] linux emulation: root dir special handling useless and harmful 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, 23 Feb 2008 13:46:41 -0000 Quoting Andriy Gapon (from Sat, 23 Feb 2008 07:50:02 GMT): > Well, I think that the issue described in this PR still holds. > On the other hand, I now think that some people might still prefer > current behavior over what I suggest. There could be some POLA concerns too. > Another concern is that now the code is common to all emulation, so it's > not linux specific anymore. > In any case, I am attaching a patch that I currently use. I see benefits in both. What about making the behavior dependand on a sysctl? This would have a much higher chance to enter the tree (default = POLA). Bye, Alexander. -- Life sucks, but death doesn't put out at all. -- Thomas J. Kopp http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137