LWN.net Logo

No he really means ALL device numbers

No he really means ALL device numbers

Posted Jan 10, 2004 4:58 UTC (Sat) by giraffedata (subscriber, #1954)
In reply to: Linus smoking crack by iabervon
Parent article: The future of device numbers

Linus is actually talking about randomization of the devices that the kernel can't necessarily keep stable.

That's exactly what he's not talking about. Linus says that the fact that the kernel can't provide stable device numbers for everything means that anyone who expects the kernel to provide static device numbers for anything is fooling himself. Therefore, he suggests making device numbers random even when they don't have to be so someone can't possibly think that device numbers are stable.

He backpedals a little and says that might be a little too hostile and out of practicality, some device numbers should be kept unrandom. But what he really believes is that all the device numbers should be random.

This whole thing assumes udev, of course. If you have static device special files in /dev that you created with mknod, as we have for 30 years, you obviously can't make all the device numbers random.

I wish we'd get away from device numbers altogether. Naming things with integers is really archaic. In the modern world, we either name them with long text strings or with temporary handles that have reference counts and are in reality memory addresses.


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds