Linked by Thom Holwerda on Sun 22nd Jul 2007 00:33 UTC, submitted by liquidat
Linux Linus Torvalds included patches into the mainline tree which implement a stable userspace driver API into the Linux kernel. The stable driver API was already announced a year ago by Greg Kroah-Hartman. Now the last patches were uploaded and the API was included in Linus' tree. The idea of the API is to make life easier for driver developers: "This interface allows the ability to write the majority of a driver in userspace with only a very small shell of a driver in the kernel itself. It uses a char device and sysfs to interact with a userspace process to process interrupts and control memory accesses."
Thread beginning with comment 257109
To read all comments associated with this story, please click here.
Full circle...
by Almafeta on Sun 22nd Jul 2007 00:43 UTC
Almafeta
Member since:
2007-02-22

In the early dasy of Linux, Linux required Minix to run on top of, and it ran its drivers like Minix did.

Then, they began to run them as part of the kernel, like Windows did.

Now, it's going back to the Minix model....

Reply Score: 2

RE: Full circle...
by jadeshade on Sun 22nd Jul 2007 01:07 in reply to "Full circle..."
jadeshade Member since:
2007-07-10

Then, they began to run them as part of the kernel, like Windows did.


For so long, it was 'oh yeah, it shouldn't crash - unless you have a bad driver'; now that problem no longer exists. Not that linux never crashes - I'd be suprised if some those using bleeding edge versions of software aren't spending more time Rxing their machine than using it.

Also, what relation does this have to FUSE, if any?

Reply Parent Score: 2

RE[2]: Full circle...
by Almafeta on Sun 22nd Jul 2007 02:03 in reply to "RE: Full circle..."
Almafeta Member since:
2007-02-22

Also, what relation does this have to FUSE, if any?


You've got me. I hadn't heard of that until I Googled it just now.

Reply Parent Score: 0

v RE[2]: Full circle...
by Bending Unit on Sun 22nd Jul 2007 12:08 in reply to "RE: Full circle..."
RE: Full circle...
by somebody on Sun 22nd Jul 2007 01:26 in reply to "Full circle..."
somebody Member since:
2005-07-07

I think it has more to do with politics than anything else.

Linus and kernel developers were not really enthusiastic about GPLv3 and its restrictions. This way kernel gets out with model that is even more free (just as Linus was ranting not so long ago) than before even if they would relicense it as GPLv3. Linus has shown a lot of willfulness towards companies developing drivers for linux and this would be it. But without ABI stability there are still needs for source to be recompiled for each kernel version (or at least wrapper part).

Reply Parent Score: 5

RE[2]: Full circle...
by hobgoblin on Sun 22nd Jul 2007 01:49 in reply to "RE: Full circle..."
hobgoblin Member since:
2005-07-06

well the wrapper is a lesser issue as it will probably not have to change much to interface with the kernel.

i just wonder what this will have to say for ati and nvidia drivers.

never mind, i see from the linked article that there are some issues with DMA and this system. to bad. but its a start ;)

Edited 2007-07-22 01:51

Reply Parent Score: 3

RE[2]: Full circle...
by MamiyaOtaru on Sun 22nd Jul 2007 23:22 in reply to "RE: Full circle..."
MamiyaOtaru Member since:
2005-11-11

But without ABI stability there are still needs for source to be recompiled for each kernel version (emphasis added)

In the past, this has been considered by some to be desirable, including (I thought)Greg Kroah-Hartman (see http://www.mjmwired.net/kernel/Documentation/stable_api_nonsense.tx... ), of which he is the author, or http://thread.gmane.org/gmane.linux.kernel/475654/focus=475727 ).

I'm just rather surprised to see GKH involved in an effort that has the side effect of making binary drivers easier. Re-reading the links I posted, it seems more like GKH supported efforts to allow only GPL drivers to be loaded because he is against binary drivers in kernel space, so it makes a little more sense now to see him working on allowing non GPL drivers in user space.

Seriously though, I have a hard time seeing the sense in it all. Intel's 3945 wireless driver ( http://ipw3945.sourceforge.net/ ) caught a lot of flack for relying on a binary userspace component. What is this new development if not an enabler for such behavior?

I obviously don't understand the issue as well as a lot of people, so I am quite happy I am not involved in the decisions. Curiosity remains however ;)

Reply Parent Score: 3

RE: Full circle...
by butters on Sun 22nd Jul 2007 03:38 in reply to "Full circle..."
butters Member since:
2005-07-08

Now, it's going back to the Minix model....

Not really... There's no message-passing component to this driver framework. It uses a kernel component to expose kernel data to a userspace component through a pseudo-device and a pseudo-filesystem. The userspace component can behave as though it has access to kernel memory, but the kernel component is actually validating accesses and providing the mappings.

So instead a set of permitted operations, we have a set of accessible memory regions. The result is that programming userspace services is more like programming kernel services, and therefore more convenient. Furthermore, it doesn't require a programmatic interface between components, so stability is very achievable.

In a sense, it rejects the basic premise of microkernel design, which is that unprivileged servers must be restricted in terms of what operations they may perform. We don't care about operations, their names, and their purposes. We only care that unprivileged code doesn't mess with kernel memory that it shouldn't be touching. That's all the isolation that really matters.

Edited 2007-07-22 03:39

Reply Parent Score: 5

RE: Full circle...
by Carewolf on Mon 23rd Jul 2007 08:36 in reply to "Full circle..."
Carewolf Member since:
2005-09-08

Actually Linux is only now starting to run its drivers like Windows (NT) does. The old model is more like DOS (and Win95-Me).

Now if they could only make a stable API for binary kernel-mode drivers, like graphics drivers, Linux could come on par with Windows.

Reply Parent Score: 1