Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Jan 2000 10:46:14 +0100
From:      Marcel Moolenaar <marcel@scc.nl>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        current@freebsd.org, emulation@freebsd.org
Subject:   Re: SUBMIT: compat.linux.pathmunge
Message-ID:  <38706FE6.2D995C0C@scc.nl>
References:  <Pine.BSF.4.21.0001022236430.51360-100000@resnet.uoregon.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
[This thread started on -hackers, went private and now pops up in
-emulation through -current. You may want to look in -hackers to see the
original posting by Doug White]

Doug White wrote:
> 
> I'm bringing this back up to -current to kick around some more.  We may
> want to move it to -emulators.

I added -emulation so that current can be removed on the reply.

> > Hmmm.. What we want is a way to tell the Linuxulator on a process/binary
> > level whether we want /compat/linux overlaying or not. Indeed, backup
> > clients will pick up /compat/linux as an ordinary directory without
> > overlaying and that is exactly what we want. In most cases we do want
> > the overlaying.
> 
> Having process/binary granularity would be more useful, but is hard to
> implement in an inobrusive way, as we're discovering below. :)  Binary
> granulatirty could be an issue for shells.

I don't think it's that hard to do. It basicly needs a bit in struc
proc, a test in linux_emul_find and a way to set the bit. It's generic
enough to be used by other emulators as well. We just need to figure out
what good ways there are to set the bit.

Alternatively, we don't have it apply to all file access. We could have
the 'no overlaying' property apply to opening directories only so that a
directory scan will yield the native directories only.

> > > If you could tag dynamic loader open()s you could have a selective
> > > translator for just that, but when it's hunting for /etc/host.conf, which
> > > one do you give it? Is it a call from resolv+ looking for it's
> > > configuration, or a backup client putting it on tape?
> >
> > What about brandelf? When a static ELF binary is branded as `Linux', we
> > have overlaying; when it's branded as 'LinuxBSD' (or what's in a name)
> > it's a Linux binary that don't want/need overlaying. Dynamic ELF
> > binaries are more tricky, but can make to work by setting
> > LD_LIBRARY_PATH in a wrapper.
> 
> Yuck.  brandelf is an agreed-on standard (or is supposed to be) and it
> wouldn't be appropriate to abuse it.

Are any other OS's branding ELF binaries?

> I'd be more apt to run the target
> app in a wrapper that makes a 'shut off translation for this pid' type
> syscall then execve()s the app.  Kinda like nohup.

What about inheritence? Setting `the bit' for a process is one thing,
but what about it's children?

I think we should implement the 'no overlaying' property as a static
property and not a dynamic one. Having it a static property means that
we need to tag it to a binary.

-- 
Marcel Moolenaar                        mailto:marcel@scc.nl
SCC Internetworking & Databases           http://www.scc.nl/
The FreeBSD project                mailto:marcel@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38706FE6.2D995C0C>