From owner-freebsd-current Mon Jan 3 1:46:33 2000 Delivered-To: freebsd-current@freebsd.org Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20]) by hub.freebsd.org (Postfix) with ESMTP id 946C315462; Mon, 3 Jan 2000 01:46:20 -0800 (PST) (envelope-from marcel@scc.nl) Received: from [212.238.132.94] (helo=scones.sup.scc.nl) by post.mail.nl.demon.net with esmtp (Exim 2.02 #1) id 12544A-0002ic-00; Mon, 3 Jan 2000 09:46:18 +0000 Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.3/8.9.3) with ESMTP id KAA08139; Mon, 3 Jan 2000 10:46:14 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <38706FE6.2D995C0C@scc.nl> Date: Mon, 03 Jan 2000 10:46:14 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.5 i386) X-Accept-Language: en MIME-Version: 1.0 To: Doug White Cc: current@freebsd.org, emulation@freebsd.org Subject: Re: SUBMIT: compat.linux.pathmunge References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [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-current" in the body of the message