Subject: Re: Pathname translation for emulations (Was: Re: Removing compat/aout)
To: Todd Vierling <tv@wasabisystems.com>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-kern
Date: 03/10/2002 11:24:03
I agree with Todd that generally, the path translation should
be applied uniformly among emulations. It just doesn't seem
to make sense to do path translation differently under
different emulations - the needs of emulated programs are mostly
identical.

Jaromir

Todd Vierling wrote:
> On Sat, 9 Mar 2002, matthew green wrote:
> 
> :    Then that's a bug.  Translation should be applied uniformly to a uniform set
> :    of syscalls.  (IMNSHO, it should be all syscalls which take a filename in
> :    the filesystem namespace.)
> 
> Actually, I misspoke here; I meant to say all syscalls that take an absolute
> pathname to something preexisting, that's opened for IO (see below).
> 
> : i don't agree.  particularly, any system call that creates anything
> : should never have path translation.  that way leads to hell.
> 
> I believe (memory only; I'd need to go search for my old comments) that the
> ideal situation is to have only open() (if the vnode preexists) or
> getdents(), on an absolute path, require path translation, and little or no
> more.  This would remove the problems we've seen without causing more.
> 
> There might be some small exceptions to this:  chdir() might warrant a
> translation *after* it's known that the path rooted at / does not exist (to
> allow an application to find its files in /emul/linux/usr/foo/etc, for
> instance).  However, this is not an issue related to the binary format or
> emulated OS, and can and should be applied uniformly.
> 
> -- 
> -- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
> -- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-