From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGUw9-0007PK-GR for qemu-devel@nongnu.org; Fri, 04 Dec 2009 04:58:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGUw7-0007OW-8c for qemu-devel@nongnu.org; Fri, 04 Dec 2009 04:58:53 -0500 Received: from [199.232.76.173] (port=60299 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGUw6-0007OO-Vx for qemu-devel@nongnu.org; Fri, 04 Dec 2009 04:58:51 -0500 Received: from lechat.rtp-net.org ([88.191.19.38]:49551) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGUw6-0004x8-LZ for qemu-devel@nongnu.org; Fri, 04 Dec 2009 04:58:50 -0500 From: Arnaud Patard (Rtp) Subject: Re: [Qemu-devel] [PATCH] linux-user: use realpath for emulation dir paths References: <1254486336.1738.30.camel@localhost.localdomain> <20091204092938.GA23929@kos.to> Date: Fri, 04 Dec 2009 11:00:10 +0100 In-Reply-To: <20091204092938.GA23929@kos.to> (Riku Voipio's message of "Fri\, 4 Dec 2009 11\:29\:38 +0200") Message-ID: <874oo76out.fsf@lechat.rtp-net.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: Paul Bolle , qemu-devel@nongnu.org Riku Voipio writes: Hi, > On Fri, Oct 02, 2009 at 02:25:36PM +0200, Paul Bolle wrote: >> Note that I have some reservations about the current init_paths() and >> path() code: >> - their names seem to confusing. Maybe those should be init_base() and >> base() or something similar; >> - why does init_paths() copy all filenames in the emulation dir (at >> least, that what it seems to do)? Try something silly like >> "-L /home/../" to see what I mean ... >> - and why does path() return the original filename if that file isn't >> found in the emulation dir? That looks like a nice source for confusing >> behavior or crashes, as that means an identical named file (but using >> the regular root) will then be used. > > Yeah, all that is a big mess and should be cleaned up. At the moment it > is all too easy to get init_paths to recurse forever.. fwiw, it should not be hard to prevent this dead loop. I have somewhere a patch avoiding going into /dev,/proc and it cured the problem. Of course, there may be some other places leading to deadloop but at least avoiding /dev and /proc would be a good start if one really wants to fix that. Arnaud