userspace driver API ?

John-Mark Gurney gurney_j at resnet.uoregon.edu
Mon Jul 23 03:06:22 UTC 2007


Dieter wrote this message on Sun, Jul 22, 2007 at 16:08 +0100:
> > I've been thinking about similar things for a while...   Though I have
> > a few concerns...
> > 
> > a) a stable API is something that Linus has touted as something that will
> > not happen for Linux, so yes, it's "stable" but can we truely depend
> > upon that?
> 
> >From the bits I read, it sounds like it is the interfaces within
> the kernel that will change at will, the interfaces between the
> kernel and userland will be stable.
> 
> > b) w/o direct DMA, it's not as useful, and implementing direct DMA
> > isn't that difficult (I do direct DMA to userland buffers for bktrau
> > and cxd)...
> 
> So propose an extension to allow DMA?
> 
> Additional concerns include:
> 
> Did they get anything significantly wrong?

Can't say, I can't understand the patch...  There doesn't appear to
be an interface in the patches that I can make out...

> Did they leave out anything besides DMA?

See above...

> Could this create any security problems?

Most definately...  It would allow the userland driver to read and
write to anywhere in physical memory..  That said, it's no more of
a security risk then loading a kernel module and the like...

> It could help the binary-only crowd, since binaries in userland
> aren't quite as bad as binaries in the kernel.

Though to a limited extent...  Don't forget there are lots of devices
that consume other interfaces besides providing a cdev to userland...
There's ifnet and geom to name a couple...   Exposing cdev only provides
a limited benifit...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-drivers mailing list