Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2007 20:06:20 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        Dieter <freebsd@sopwith.solgatos.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: userspace driver API ?
Message-ID:  <20070723030620.GD99491@funkthat.com>
In-Reply-To: <200707222308.XAA17276@sopwith.solgatos.com>
References:  <20070722213451.GA99491@funkthat.com> <200707222308.XAA17276@sopwith.solgatos.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070723030620.GD99491>