From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HzxeT-00024b-PJ for qemu-devel@nongnu.org; Sun, 17 Jun 2007 12:30:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HzxeS-00021t-7i for qemu-devel@nongnu.org; Sun, 17 Jun 2007 12:30:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzxeS-00021q-5M for qemu-devel@nongnu.org; Sun, 17 Jun 2007 12:30:56 -0400 Received: from cmburns.debconf.org ([80.68.86.241]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HzxeR-00057k-Q2 for qemu-devel@nongnu.org; Sun, 17 Jun 2007 12:30:55 -0400 Received: from homer.dc7.debconf.org (unknown [129.215.255.137]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client CN "homer.dc7.debconf.org", Issuer "Certificate Authority - Email" (verified OK)) by cmburns.debconf.org (Postfix) with ESMTP id C05E71C8062 for ; Sun, 17 Jun 2007 16:30:53 +0000 (UTC) Received: from [10.8.249.248] (helo=lagash ident=Debian-exim) by homer.dc7.debconf.org with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HzxeO-0000ig-R9 for qemu-devel@nongnu.org; Sun, 17 Jun 2007 17:30:52 +0100 Received: from ths by lagash with local (Exim 4.67) (envelope-from ) id 1HzxeO-00009C-BO for qemu-devel@nongnu.org; Sun, 17 Jun 2007 17:30:52 +0100 Date: Sun, 17 Jun 2007 17:30:52 +0100 Subject: Re: [Qemu-devel] [PATCH][UPDATED] Fix path mangling in linux-user/path.c Message-ID: <20070617163052.GA19155@networkno.de> References: <53fbb7580705211623n3c0c3bf2x9e68842fc25a43be@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53fbb7580705211623n3c0c3bf2x9e68842fc25a43be@mail.gmail.com> From: Thiemo Seufer Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Lauri Leukkunen wrote: > Attached patch fixes the linux-user path mangling code for use with > real target root filesystems that have nasty symlinks and lots of > files. The old code is terribly slow and can easily end up going > through the entire host system /usr hierarchy in a recursive loop. > > Compared to the previous version of this patch, fixes an issue with > attempting to free() a pointer returned by GNU basename(). I gave it a try, and found: - It loses the path caching (which should be done incrementally to avoid the slowness you observe) - It misses to do error handling on malloc() returns - It is broken, an emulated "/bin/ls /.." shows it ascends above the root. Thiemo