Subject: Re: namei() for binary emulations
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 07/17/2005 23:06:46
--98e8jtXdkpgskNou
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jul 17, 2005 at 09:50:48PM +0200, Jaromir Dolecek wrote:
> On Mon, Jul 04, 2005 at 08:02:37PM +0200, Quentin Garnier wrote:
> > I think it is a completely different issue.  The current problem with
> > COMPAT_NETBSD32 is a side-effect of the way we do binary emulations.
>=20
> Sure.
>=20
> Solution might be to use a special ld.so, which would take care to load l=
ibs
> from within /emul/netbsd32 first, and otherwise don't do any pathname
> traslation dance in the COMPAT_NETBSD32 code itself. Do we need the
> alt path checking for anything else besides the 32-bit libraries?

We probably can do many tricks to avoid the issue, but in the end it will
always mean you can't get a NetBSD/i386 release and drop it into
/emul/netbsd32 to use it on amd64 (same for sparc/sparc64 of course).

But anyway, there might be files that are arch-dependent, for which you
need the application to access the correct one.  Also, with the path
translation, you can use the pkg tools and install 32-bits packages
inside the 32-bits root without doing anything.

In the end it's always a matter of convenience, and IMO we have two
options for the netbsd32 emulation:  either we teach both the 32-bits
arch and the 64-bits arch that they might live together, and for
example, make 64-bits binaries use /libexec64/ld.so_elf no matter what,
and so on.  That way both archs live in the same root.

The other option is to do the path translation dance we do, although the
current way of doing it is incomplete.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--98e8jtXdkpgskNou
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQtrIZtgoQloHrPnoAQK+0wgAn5tGypB6CfZ0QoNBXTOPqbHfqosgeUl7
bL5EdN8O/Sq+yvELsBQH5KPBujp5lqPnY1/RqFvre9BZ8z31ZKovkV7co6prYQVf
ezJgjELcuTcrrnj8Uj2aUWRJf/LCpKSV/sXl4TGkZIEP1pbIFpF/C1tVDJLo1PSD
uTgC9eO6zzmHodEstDsU4QGceiWKCbEtb3ZhPIFdReMbV164Hnsj8+ET5nqJAWm7
cm+JingBSM152/dBtSy5mMDw1H98AmK+wFgWKgMfmXEzotCAPoG61JDgUhJbXlVf
p9gIeULmXUvqJveGzsL95kzM2Pm1JppO3TvZA68uV+2KjSh4Uz/6aQ==
=Mqan
-----END PGP SIGNATURE-----

--98e8jtXdkpgskNou--