Subject: Re: turn bpf device into a cloner
To: Charles M. Hannum <abuse@spamalicious.com>
From: None <cube@cubidou.net>
List: tech-net
Date: 11/27/2004 23:36:29
--s2ZSL+KKDSLx8OML
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 27, 2004 at 07:04:04PM +0000, Charles M. Hannum wrote:
> On Saturday 27 November 2004 18:52, Christos Zoulas wrote:
> > The following patch turns /dev/bpfX into cloners. Only one is really
> > needed, /dev/bpf, but for now we can leave the stray /dev/bpfX's until =
we
> > fix the source code. Comments?
>=20
> Thanks (well, not really) to ptyfs, there are already four methods of cre=
ating=20
> cloning devices in the kernel.  This adds a fifth.
>=20
> This has already way out of hand.  Before you add more one-off hacks, it =
is=20
> time to sit down and actually DESIGN how cloning devices are going to wor=
k=20
> globally.

Why did you back out the changes that had the fd passed all up to the device
open function?  The CVS log could not be more useless about it, and there is
no mention of it I could find in the mail archives.  I've been looking into
cloning devices the past weeks, only to find a lot of "don't do that" witho=
ut
much explanation of why it is a bad idea.

I find the dupfd hack very ugly, but actually working on the fd structure to
clone device is a way to turn what was a device node into anything you want.
For that passing the fd structure over was very convenient, and way cleaner
than the dupfd hack.  But why was it removed, then?  What were the drawback=
s?

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"Commala-come-five! / Even when the shadows rise!
To see the world and walk the world / Makes ya glad to be alive."
Susannah's Song, The Dark Tower VI, Stephen King, 2004.

--s2ZSL+KKDSLx8OML
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iQEVAwUBQakBbNgoQloHrPnoAQLpYQgArOAnuhDiF83gb7+OHerq0Jeb2+CvkJ9Y
OtnCe7zuKf7ipUaV2ceWiuTH373H1NVQNGJBK+ULj/KhEE3OHzwoU8p8nzDtvOwb
xzjqgdNjgDbbGJLcyCMOI5lqNhrfwX+ajrvN7DZUXbcu/lizPTGf9KwZxwX22W96
zAte5eAQclnRMvV/PECINQMqV/Jwn6lk+QGeSsZUSd1bHLsuEzfc5C+qrE18SF43
t58vLTAYBezGWyQ2jpc9huCMJvDd/EdR/IteMeXk3I0gi2+b9kmvnFpp8G417nEY
6NDx+w0/GbX2TU0e0WZO6f0DLqexRuTg9cFYKR5VxBV0YKsjuIepNQ==
=uInO
-----END PGP SIGNATURE-----

--s2ZSL+KKDSLx8OML--