On Mon, May 31, 2010 at 12:23:11AM +0200, Hans Petter Selasky wrote: > 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. We do trying hard to keep ABI stable both between and on branches.
> > > > > 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. You have to do one more copyin() then. Newer kernel/user interfaces tend to use ints and explicitely sized integer types, like sys/user.h:struct kinfo_vmentry, so your proposal is sound and agrees with best practice, but for new interfaces. For the old interfaces, please do not break ABI.
pgpYozPNHoQqu.pgp
Description: PGP signature