<-- Back to schedule

Botching up IOCTLs

Project: Linux Kernel/DRM (direct rendering manager) subsystem

One clear insight kernel graphics hackers gained in the past few years is that trying to come up with a unified interface to manage the execution units and memory on completely different GPUs is a futile effort. So nowadays every driver has its own set of ioctls to allocate memory and submit work to the GPU. Which is nice, since there's no more insanity in the form of fake-generic, but actually only used-once interfaces. But the clear downside is that there's much more potential to screw things up.

To avoid repeating all the same mistakes again this talk will present some of the lessons learned while botching the job for the drm subsystem in general and the i915 driver specifically. Topics covered will be the bare basic to avoid needless busywork later on, reasonable minimal testing to avoid CVEs and other embarrassement. And generally a thicket of war stories to figure out what works and where's still some white spots in the userspace interface landscape.

Daniel Vetter

Daniel Vetter started to contribute to the linux kernel a few years ago when the
graphics stack rewrite broke his old laptop and all the developers were busy
fixing newer machines. From then on it went all downhill and since 2011 he's
enjoying the fun and frustration of working on the Linux graphics driver stack
professionally at Intel's OTC. Since 2012 he is also the kernel maintainer of
the Intel graphics driver.

As the i915 maintainter Daniel managed to get the quality issues under control
and the driver off the infamous No. 1 spot on the kernel's regression list -
where it beat entire subsystems. He established solid testing procedures,
created an entire new testsuite for the kernel and enforced strict requirements
for merging patches.

Additionally Daniel spent a lot of time improvimg the drm (direct rendering
manager) subsystem. Daniel was a major driver behind the effort to write
documentation for all driver interfaces. He removed lots of old cruft and
separated the new-world modesetting driver from the horror show of the legacy
drivers and reducing the rather hapzardous ioctl interface surface for drivers.