From owner-freebsd-current@FreeBSD.ORG Tue Dec 23 20:21:58 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 413281065674; Tue, 23 Dec 2008 20:21:58 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id AD9E08FC13; Tue, 23 Dec 2008 20:21:57 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by postfix2-g20.free.fr (Postfix) with ESMTP id 66CC12E30728; Tue, 23 Dec 2008 18:48:05 +0100 (CET) Received: from smtp4-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp4-g19.free.fr (Postfix) with ESMTP id 09B9C3EA105; Tue, 23 Dec 2008 20:48:18 +0100 (CET) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp4-g19.free.fr (Postfix) with ESMTP id C45743EA0F5; Tue, 23 Dec 2008 20:48:17 +0100 (CET) Received: from tulipe.herbelot.nom (tulipe.herbelot.nom [192.168.2.5]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id mBNJmCmk025084; Tue, 23 Dec 2008 20:48:13 +0100 (CET) From: Thierry Herbelot To: freebsd-current@freebsd.org Date: Tue, 23 Dec 2008 20:48:06 +0100 User-Agent: KMail/1.9.10 References: <20081222214010.GA18389@elvis.mu.org> <20081223190808.GC1176@hoeg.nl> <20081223193056.GA65161@rink.nu> In-Reply-To: <20081223193056.GA65161@rink.nu> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200812232048.07375.thierry.herbelot@free.fr> Cc: Rink Springer , Hans Petter Selasky Subject: Re: HEADSUP usb2 (usb4bsd) to become default in 2 weeks. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 20:21:58 -0000 Le Tuesday 23 December 2008, Rink Springer a écrit : > On Tue, Dec 23, 2008 at 08:08:08PM +0100, Ed Schouten wrote: > > * Hans Petter Selasky wrote: > > > On Tuesday 23 December 2008, Dag-Erling Sm?rgrav wrote: > > > > There are serious issues with the permissions model, which were > > > > raised in Strasbourg and AFAIK never addressed. > > > > > > This is more complicated than you think. If you require a change in > > > this area than please point me to an existing example implementing > > > something similar. I know about the "kern_priv()" function, but there > > > are no specific groups for USB, which needs to be discussed. The > > > current implementation is good enough for most use cases in my opinion. > > > > Just create device nodes in devfs. Let devfs handle the permissions. If > > they are insufficient, then we should add ACL support to devfs. > > Due to the design of USB2, this isn't quite as obvious as it may seem; > for example, an USB device has multiple endpoints, and if some process > opens endpoint 1 and 3, you don't want to block another process from > opening endpoint 2, for example. There are a lot of interesting > combinations possible, and this is only the tip of the iceberg :-) Hello, Speaking of permissions, please do not forget that endpoint 0 may be simultaneously used by multiple processes (for multiple interleaved USB requests). As a Me-Too : one current difficulty with usb2 is the loss of device nodes for addressing individual endpoints. One the other hand, the performance is so much better .... impressive even from userland, when using libusb20. I just have found what may be an issue, which is : reading from bulk endpoints, I can get data if the reads are in two separate processes, but not from two threads in the same process. Thanks for the good work TfH > > Regards,