From owner-svn-src-all@FreeBSD.ORG Mon Nov 29 20:53:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91007106564A; Mon, 29 Nov 2010 20:53:12 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D55758FC0C; Mon, 29 Nov 2010 20:53:11 +0000 (UTC) Received: by wwf26 with SMTP id 26so689387wwf.31 for ; Mon, 29 Nov 2010 12:53:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.147.148 with SMTP id l20mr6569807wbv.118.1291063990509; Mon, 29 Nov 2010 12:53:10 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.227.143.200 with HTTP; Mon, 29 Nov 2010 12:53:10 -0800 (PST) In-Reply-To: <20101016132753.GU2392@deviant.kiev.zoral.com.ua> References: <20101016100051.GS2392@deviant.kiev.zoral.com.ua> <201010161212.43749.hselasky@freebsd.org> <201010161330.31549.hselasky@c2i.net> <20101016132753.GU2392@deviant.kiev.zoral.com.ua> Date: Tue, 30 Nov 2010 09:53:10 +1300 X-Google-Sender-Auth: KiraqYxsVK5au1NTHxm7aKOIwM4 Message-ID: From: Andrew Thompson To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Hans Petter Selasky Subject: Re: svn commit: r213852 - in head: lib/libusb sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 20:53:12 -0000 On 17 October 2010 02:27, Kostik Belousov wrote: > On Sat, Oct 16, 2010 at 01:30:31PM +0200, Hans Petter Selasky wrote: >> On Saturday 16 October 2010 12:12:43 Hans Petter Selasky wrote: >> > On Saturday 16 October 2010 12:00:51 Kostik Belousov wrote: >> > > > USB has some shared memory structures which are used in both user-= land >> > > > and =A0kernel, which are not part of IOCTLs. Your approach means t= hat >> > > > there are two sets of IOCTL's of all kinds, one for 32-bit and one= for >> > > > 64-bit? >> > > >> > > For all kinds of structures that are not ABI-invariant, yes. >> > >> >> Hi, >> >> I've committed a patch to fix the buildworld breakage after feedback fro= m >> Andreas Tobler. >> >> http://svn.freebsd.org/changeset/base/213920 >> >> > The approach that was discussed by me and Andrew earlier this year, wa= s to >> > use uint64_t instead of "void *" in shared memory structures. The only >> > disadvantage is that this will force you to recompile libusb when you >> > update the kernel, and so we kind of put that approach aside to keep >> > seamless upgrade compatibility. >> >> This will also break the ABI on 8-stable and that was the main reason fo= r >> going the other route. However, most applications access USB via libusb,= so >> the breakage would probably be minimal. Do you have any opinions here? S= hould >> we make an exception for the general rule to not change the ABI within a >> stable branch? >> >> I'm attaching the other approach, which allows both 32 and 64 bit applic= ations >> to use USB using the same IOCTL's. >> >> See thread: [FreeBSD 8/9] [64-bit IOCTL] Using the USB stack from a 32-b= it >> application under a 64-bit kernel. >> > This is a choice of the poison :). > > Ideally, you would switch to the new ABI and keep old ABI shims around > for binary compatibility. In essence, this is equivalent to the proper > 32bit compat shims. Is this change something that could be merged to 8.2? libusb consumers should not be affected but I do not know if any other applications would be affected. Andrew