Hacker News new | ask | show | jobs
by azahk 2937 days ago
Someone once had the great idea that drivers should be in the same codebase as the kernel. Crazy, I know.
1 comments

It doesn’t seem crazy to me that something that runs in kernel mode and uses kernel APIs should be in the kernel codebase. What are the downsides?
Why should drivers necessarily run in the kernel? With appropriate abstraction for interrupts, DMA, etc. much of the work could be done in userland.
That’s true, but it’s AFAICT a separate question.

The question I was responding to was: “accepting that, rightly or wrongly, Linux drivers run in kernel mode, does it make sense for them to be in the source tree?”

The main downside is that a bad/buggy driver can take down the entire system.
That's a problem with the architecture but a reason for having the drivers in the kernel. It means such a case will be handled as a regression and fixed as opposed to the driver just never being available again.
Linux would have beaten Windows if it wasn't for that.
But at what cost? I don't want to run Linux with non-free drivers. That's not the point.
That's cool. On the other hand, I would love to have a stable API for drivers so manufacturers can release their drivers. That has been taken from me, and now Linux will never be a real choice for me without good GPU drivers, as an example.