Subject: Re: 32 bit dev_t
To: None <tech-kern@NetBSD.ORG>
From: Charles M. Hannum <mycroft@mit.edu>
List: tech-kern
Date: 01/13/1998 09:04:13
Something else occurs to me:

There's a potentially nasty `stupid user' issue lurking here.  If you
simply follow Chris's proposal and do a straight 12/20 split, using
major number 0 to flag old-style nodes, then an old MAKEDEV(8) with a
new mknod(8) or a new MAKEDEV(8) with an old mknod(8) will create
bogus device numbers.  This is going to bite people -- maybe even
inadvertantly opening security holes.

With my proposal (using non-contiguous minor numbers), old MAKEDEV(8)s
will continue to create useful device nodes, before or after a
renumbering.  The one catch is that a new MAKEDEV(8) and an old
mknod(8) will screw up major numbers >=256.  That could be solved by
making the new MAKEDEV(8) use a new mknod(8) option (like the one
which specifies the device number format, even though it's not
strictly needed) to cause an old mknod(8) to fail.