Date: Mon, 31 May 2010 01:32:34 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: [FreeBSD 8/9] [64-bit IOCTL] Using the USB stack from a 32-bit application under a 64-bit kernel. Message-ID: <20100530223234.GO83316@deviant.kiev.zoral.com.ua> In-Reply-To: <201005310023.11672.hselasky@c2i.net> References: <201005302150.15232.hselasky@c2i.net> <20100530221955.GN83316@deviant.kiev.zoral.com.ua> <201005310023.11672.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--JOUqYYSeXsqzCnuM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > Hi, >=20 > > Doesn't this change the existing ABI for 32bit platforms ? >=20 > Yes, it changes the ABI. We do trying hard to keep ABI stable both between and on branches. >=20 > >=20 > > 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. > >=20 >=20 > The problem in the case of USB is that we have to resolve "void **" and n= ot=20 > only "void *", in which case your solution would work. This is the case t= o=20 > 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. --JOUqYYSeXsqzCnuM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwC54IACgkQC3+MBN1Mb4hKMwCfQouIFzE3FZjPDLc/DrQbg8oy r1YAoNxwiUFZfLEBc4Ku1rsjtv+C2Q/k =U/Fw -----END PGP SIGNATURE----- --JOUqYYSeXsqzCnuM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100530223234.GO83316>