[FreeBSD 8/9] [64-bit IOCTL] Using the USB stack from a 32-bit application under a 64-bit kernel.

Hans Petter Selasky hselasky at c2i.net
Sun May 30 22:25:59 UTC 2010


On Monday 31 May 2010 00:19:55 Kostik Belousov wrote:

Hi,

> Doesn't this change the existing ABI for 32bit platforms ?

Yes, it changes the ABI.

> 
> You may take a look at the sys/net/bpf.c, where the similar
> issue is handled for bpf ioctls. To keep the ABI intact, you
> would need to define the 32bit ABI structures and define
> compat ioctls, then handle the ioctls by converting the structures
> and calling the native handler. BIOCSRTIMEOUT32 is a good example.
> 

The problem in the case of USB is that we have to resolve "void **" and not 
only "void *", in which case your solution would work. This is the case to 
reduce the copying between the kernel and user-space.

--HPS


More information about the freebsd-hackers mailing list