Separately from using a memory safe language for most of the code, device drivers usually do not need to run in a privileged context. They can be run in an isolated process with the IOMMU containing the hardware. Exploiting a network driver shouldn't compromise a whole system.
Conversation
This Tweet was deleted by the Tweet author. Learn more
Even before IOMMU existed, the programming model of letting drivers setup DMA themselves rather than going through a safe public interface that could have imposed IOMMU on them with no source-level changes was bad design.
This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
iOS implements TCP/IP in userspace and most operating systems have drivers at least partially implemented in userspace. Many of the secondary processors in a computer run a microkernel with isolated components. Most smartphones have *at least* one L4 implementation in them.
1
2
You talk about microkernels / isolated drivers and memory safe languages as if they're not already been broadly used in the wild. Most code is written in memory safe languages these days. Systems code is increasingly moving to them too. Kernels and drivers are *mostly* not yet.
1
1
This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
That's not at all based in reality. Splitting things up into smaller, more easily understood components that are isolated from each other isn't something poorly understood. Monolithic kernels with shared everything threads have far more communication / concurrency complexity.
1
Threads sharing data structures, synchronizing together with locking and passing data between each other are obviously communicating. Everything is shared and accessible across them. There are no clear boundaries or communication protocols. It's very complex and not understood.
There's a reason mentioned lockdep, but concurrency / communication in Linux is a lot more complicated than just getting locking right. twitter.com/billhuey/statu
Sharing far more and communicating far more in poorly defined / understood ways is not simpler or easier.
Quote Tweet
Replying to @DanielMicay @vyodaiken and 5 others
It's like that for Linux kernel as well. There are classes of bugs that defy casual static analysis and you have to basically make your own runtime correctness checking tools (lockdep etc)
1
1
Hence the “etc” at the end of my tweet. Just a conversation warmer. Don’t read too much into it :)
1
Show replies


