Subject: Re: Device minor numbers conversion in COMPAT_NETBSD32
To: Michael van Elst <mlelstv@serpens.de>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 01/03/2006 09:42:52
--HEgoE9Ku6Eog9oq6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 03, 2006 at 08:27:16AM +0000, Michael van Elst wrote:
> cube@cubidou.net (Quentin Garnier) writes:
[...]
> >That means that in order for case 2 to still work, we'll require that
> >one step of the COMPAT_NETBSD32 setup is to populate /emul/netbsd32/dev
> >with i386's MAKEDEV.  Through the compat rewrite of path, i386 binaries
> >will get the correct path and access the correct device.
>=20
> Is there a reason to keep the minor numbering for /i386 other than
> 100% compatibility? To me the amd64 way sounds more logical.

Clearly it is.  But the upgrade path for a new /dev that contains
different minors for disks devices is complicated, and that will make
a lot of angry users.  I believe it would make more angry users than
by the time this hack was introduced (if it had been done that way at
the time, we wouldn't have an issue now).
=20
> Path rewriting will make i386 binaries work, but then you create
> device aliases with possible different ownership/permissions.
> How do you keep them in sync without creating security issues?

None of the solutions are completely satisfactory, I'm aware of that.

It will have to be very carefully documented.  But again, in most
situations the user won't have to do anything if we do the device number
conversion.  Populating the emulated /dev is required if you need access
to those devices.

I really really hope this issue is limited to disk drivers, and I really
really hope people will be careful enough so that such hacks will not
bite us anymore in the future.

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

--HEgoE9Ku6Eog9oq6
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iQEVAwUBQ7o5DNgoQloHrPnoAQJacggAlmD/k/Kuu9UUlKmwptE4d51VHuS/hNBC
LJ1+x8BOmCom3jCk3Wqu7YN8XAXd1v48emzrgddAkc57/HRS8HmO/LzCIbj8s5OM
ee8Nzbg9Iaa7vt1VpHWgbY0SxmtYU/w4QoOkwQkkBs2witH0yJeZccr2VZD/hdB+
pO5EC0SAcjIt0JKm2RUqkyu4iqMC+qV9ZIbLm/zPNvpUqiUtwaa1VVG9JKgjsYKt
r4GI0/YEhuAtStf0S5lPpT+asP5clmjOSCtGcTeCRbetOJyUndnsZnfPUiAEf4Tj
P7ZWgFBTNIAWllp/VFXu7K/1QzTqPrURHUazZMHIowv0zxP4NPcOqw==
=MwUp
-----END PGP SIGNATURE-----

--HEgoE9Ku6Eog9oq6--