From owner-freebsd-hackers@FreeBSD.ORG Sun May 30 22:32:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D730D1065676 for ; Sun, 30 May 2010 22:32:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6FF8FC14 for ; Sun, 30 May 2010 22:32:39 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o4UMWmek084226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 May 2010 01:32:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o4UMWZAf051550; Mon, 31 May 2010 01:32:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o4UMWYtd051549; Mon, 31 May 2010 01:32:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 31 May 2010 01:32:34 +0300 From: Kostik Belousov To: Hans Petter Selasky Message-ID: <20100530223234.GO83316@deviant.kiev.zoral.com.ua> References: <201005302150.15232.hselasky@c2i.net> <20100530221955.GN83316@deviant.kiev.zoral.com.ua> <201005310023.11672.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JOUqYYSeXsqzCnuM" Content-Disposition: inline In-Reply-To: <201005310023.11672.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua 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. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2010 22:32:40 -0000 --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--