Artem Kachitchkine wrote:
IMHO, adding new frameworks to the OS in order to work around legal
issues is a fundamentally flawed motivation and can lead to duplication,
added maintenance burden, confusion among developers and other problems.
While there are purely technical advantages of a generic usermode driver
framework, so far they proved to be overweighed by disadvantages.
Performance concerns are also an issue (might not seem important on a
single-user system, but think of hundreds of userland driver instances
simultaneously syscalling like crazy). Less generic, class/bus-specific
interfaces such as libusb are more practical, in my opinion. -1 from me.
Let me give a real and current example of the performance problem of
crossing the user/kernel boundary.
In the crypto framework (http://opensolaris.org/os/project/crypto) we
need to go from userland to kernel to access hardware. If the datasize
is small (approx less thatn 512 bytes) we have found that the path from
kernel to the hardware isn't worth it for accelerating some algorithms,
and even more so when going from userland to kernel and out to the hardware.
I could easily see a usermode driver having a similar problem.
Also what is the security model that allows writing drivers safely in
userland ? One security advantage would be if the "drivers" could run
with very little privilege, but if they require all privileges then
there is actually a possible increase in risk rather than a decrease
(userland things are generally easier to mount an attack on).
For some hardware I think the "driver" in userland makes 100% sense, USB
printers I think are the perfect example of this, since much of the hard
work is done by a USB class driver.
--
Darren J Moffat
_______________________________________________
opensolaris-discuss mailing list
[email protected]