Subject: Re: CFR: The Auto-Generation Block/Character Device Switch Tables
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 05/16/2002 13:51:36
On Thu, May 16, 2002 at 11:11:44PM +1000, Darren Reed wrote:
> In some email I received from der Mouse, sie wrote:
> > > Then again, does it really matter if the major number for
> > > /dev/console is 1048219 or /dev/wd1a has a major number of 390342 ?
> > > So long as MAKEDEV knows what they areit shouldn't be a problem,
> > > right ?
Except that MAKEDEV isn't executed on every reboot....
>
> Tell me, do you care what inode number /etc/passwd has ? Or /root ?
> What difference does it make if the major number for a device is X or Y ?
The difficulty is that if you change any of the major numbers you
can't boot an old kernel. This makes the upgrade somewhat tricky
- especially for the developers who definitely won't get it right
first time :-(
> Is there any real value in it or is it just pleasing the asthetics of
> a particular group of people ? Why do I need to spend time worrying
> about what major number a device when building a system as opposed to
> worrying about tightening down the system from hackers ?
Is the only sensible ay to approach a 'secure' /dev to use a devfs
filesystem and to (optionally) treat all other disk device inodes
as invalid.
That way you can't pick up a major number that is intended for
a different kernel.
OTOH all you (probably) do is abstract the problem out a level!
David
--
David Laight: david@l8s.co.uk