From: Paul Bolle <pebolle@tiscali.nl>
To: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Riku Voipio <riku.voipio@iki.fi>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: use realpath for emulation dir paths
Date: Fri, 04 Dec 2009 11:37:44 +0100 [thread overview]
Message-ID: <1259923064.2765.23.camel@localhost.localdomain> (raw)
In-Reply-To: <874oo76out.fsf@lechat.rtp-net.org>
On Fri, 2009-12-04 at 11:00 +0100, Arnaud Patard wrote:
> Riku Voipio <riku.voipio@iki.fi> writes:
> > 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.
It's been two months, so I have forgotten most details here, but why is
the init_path() step actually needed? Can't path() simply prepend the
name of emulation dir, if any, and return that (possibly unaltered)
path?
I guess the original path must be altered too (ie, it should point to
the newly created path and the original string should be freed). Can't
that be done reliably?
Paul
prev parent reply other threads:[~2009-12-04 10:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 12:25 [Qemu-devel] [PATCH] linux-user: use realpath for emulation dir paths Paul Bolle
2009-12-04 9:29 ` Riku Voipio
2009-12-04 10:00 ` Arnaud Patard
2009-12-04 10:37 ` Paul Bolle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259923064.2765.23.camel@localhost.localdomain \
--to=pebolle@tiscali.nl \
--cc=arnaud.patard@rtp-net.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).