Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2010 09:53:10 +1300
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: svn commit: r213852 - in head: lib/libusb sys/dev/usb
Message-ID:  <AANLkTi=T0H=X123xrsSvyVmZ3=yAjO%2Bcbwu=67=VOZPG@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On 17 October 2010 02:27, Kostik Belousov <kostikbel@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=T0H=X123xrsSvyVmZ3=yAjO%2Bcbwu=67=VOZPG>