
When a driver challenges the kernel's assumptions
When a driver challenges the kernel's assumptions Unix-based systems have been around for more than 50 years now. Although the best design ideas still prevail to this day, the evolution of the computing industry has forced operating system designers to rethink the way they work, multiple times over time. From a device driver point of view, the most important change was the change from fixed, compile-time hardware configuration, enumerated upon boot and never changing afterwards, to a more dynamic model, where devices can come and go: storage devices first, with the first hotplug-capable SCSI controllers in the first half of the 1990s, and complete devices shortly later, first with the introduction of the PCMCIA bus on laptops, then with USB and Firewire, which were not limited to laptops. While PCMCIA support in open source operating systems had lingered for a few years before being integrated (both in Linux with "pcmcia-cs" and in FreeBSD with the "laptop package"), by the time USB support was being worked on, the required changes to accept/allow that devices may show up or disappear at any time had been completed and tested, and the kernel had no excuse not to cope with removable devices. Today's story is the story of a device driver which caused some kernel assumptions to no longer stand, and the work done to remediate this situation, letting the kernel cope with the new world order. This story starts on the 12th of march 2009. Theo de Raadt is travelling to Japan to visit fellow OpenBSD developer Ryan McBride , best known for implementing the CARP network high-availability protocol in OpenBSD, who has been living in Japan for a few years already. Every time he goes to Japan, Theo never misses the opportunity to visit Akihabara in Tokyo, in order to find new computing devices to play with. Among the devices he picks this time, is a small display, the size of a smartphone, with an usb cable, shown here running an X server under OpenBSD for the first time, a few months later. (picture courtesy of Marcus Glocker) The company making these USB displays is called DisplayLink . DisplayLink provides binary-only drivers for Microsoft Windows and Apple Mac OSX, and nothing more. This caused some frustration in the free software world, and Florian Echtler , with the help of Chris Hodges , worked on reverse engineering the device, with the intent to get it working under Linux. All of their work is nowadays described at https://floe.butterbrot.org/matrix/hacking/dlnk/ . Of course, at this point, there is no support for these devices in OpenBSD either, and they attach as generic USB devices when connected: <deraadt> ugen0 at uhub0 port 3 "DisplayLink LCD-8000U" rev 2.00/0.02 addr 2 <deraadt> Picked up that too Moments later, Matthieu Herrb points to Florian Echtler's information: <matthieu> <http://floe.butterbrot.org/displaylink/doku.php> https://github.com/floe/tubecable/tree/master/doc ) The DisplayLink device gets passed from Theo de Raadt to developer Claudio Jeker , who lives in Switzerland close to another developer who has been recently working on USB devices, and...
Preview: ~500 words
Continue reading at Hacker News
Read Full Article