From owner-freebsd-drivers@FreeBSD.ORG Mon Jul 23 03:06:22 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05D0516A417 for ; Mon, 23 Jul 2007 03:06:22 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id B029E13C461 for ; Mon, 23 Jul 2007 03:06:21 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gplsppb8wnlcjdt1@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l6N36LZD004592; Sun, 22 Jul 2007 20:06:21 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l6N36K2b004591; Sun, 22 Jul 2007 20:06:20 -0700 (PDT) (envelope-from jmg) Date: Sun, 22 Jul 2007 20:06:20 -0700 From: John-Mark Gurney To: Dieter Message-ID: <20070723030620.GD99491@funkthat.com> Mail-Followup-To: Dieter , freebsd-drivers@freebsd.org References: <20070722213451.GA99491@funkthat.com> <200707222308.XAA17276@sopwith.solgatos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707222308.XAA17276@sopwith.solgatos.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-drivers@freebsd.org Subject: Re: userspace driver API ? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 03:06:22 -0000 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."