qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached)
@ 2006-07-14  2:31 Michael Gilbert
  2006-07-14  3:30 ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Gilbert @ 2006-07-14  2:31 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

please review the attached patch (to linux-user/path.c), which i
believe fixes the problem of qemu looping forever on symlinks when
using -L.  it is undesirable (i believe) for the -L option to search
all subdirectories.  this is in reference to debian bug #297572
(bugs.debian.org/297572).

mike gilbert

[-- Attachment #2: path.diff --]
[-- Type: text/x-patch, Size: 356 bytes --]

--- source/qemu-0.8.1/linux-user/path.c	2006-05-03 16:32:58.000000000 -0400
+++ path-me.c	2006-06-22 21:31:19.000000000 -0400
@@ -100,7 +100,7 @@
         return;
 
     base = new_entry("", NULL, prefix+1);
-    base = add_dir_maybe(base);
+    //base = add_dir_maybe(base);
     if (base->num_entries == 0) {
         free (base);
         base = NULL;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached)
  2006-07-14  2:31 [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached) Michael Gilbert
@ 2006-07-14  3:30 ` Paul Brook
  2006-07-15 22:34   ` Anderson Lizardo
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Brook @ 2006-07-14  3:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Gilbert

On Friday 14 July 2006 03:31, Michael Gilbert wrote:
> please review the attached patch (to linux-user/path.c), which i
> believe fixes the problem of qemu looping forever on symlinks when
> using -L.  it is undesirable (i believe) for the -L option to search
> all subdirectories.  this is in reference to debian bug #297572 
> (bugs.debian.org/297572).

Have you tried running dynamically linked executables with your patch?

The whole point of the -L option is so that it picks up target shared 
libraries, eg. in lib and usr/lib. By my reading your patch makes the -L 
option do absolutely nothing, which can't be right.

The proper fix is to do the lookups when a file is accesses (possibly with 
caching) not pre-scan the whole tree.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached)
  2006-07-14  3:30 ` Paul Brook
@ 2006-07-15 22:34   ` Anderson Lizardo
  2006-07-15 22:39     ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Anderson Lizardo @ 2006-07-15 22:34 UTC (permalink / raw)
  To: qemu-devel

On 7/13/06, Paul Brook <paul@codesourcery.com> wrote:
> The whole point of the -L option is so that it picks up target shared
> libraries, eg. in lib and usr/lib. By my reading your patch makes the -L
> option do absolutely nothing, which can't be right.
>
> The proper fix is to do the lookups when a file is accesses (possibly with
> caching) not pre-scan the whole tree.

Is it possible to use the same cache format as ld.so
(/etc/ld.so.cache)? So a command like

qemu-arm -L /target program

would make qemu look for /target/etc/ld.so.cache as its cache, and a
command like:

qemu-arm -L /target /target/sbin/ldconfig

would update this cache. Unless the cache you are proposing has
different purposes than ld.so's cache?

Regards,
-- 
Anderson Lizardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached)
  2006-07-15 22:34   ` Anderson Lizardo
@ 2006-07-15 22:39     ` Paul Brook
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Brook @ 2006-07-15 22:39 UTC (permalink / raw)
  To: qemu-devel

On Saturday 15 July 2006 23:34, Anderson Lizardo wrote:
> On 7/13/06, Paul Brook <paul@codesourcery.com> wrote:
> > The whole point of the -L option is so that it picks up target shared
> > libraries, eg. in lib and usr/lib. By my reading your patch makes the -L
> > option do absolutely nothing, which can't be right.
> >
> > The proper fix is to do the lookups when a file is accesses (possibly
> > with caching) not pre-scan the whole tree.
>
> Is it possible to use the same cache format as ld.so

I don't think there's any point having a persistent cache, and I don't thin 
the ld.so format would be particularly appropriate either. Qemu just does 
straight filename translation.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-15 22:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-14  2:31 [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached) Michael Gilbert
2006-07-14  3:30 ` Paul Brook
2006-07-15 22:34   ` Anderson Lizardo
2006-07-15 22:39     ` Paul Brook

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).