From owner-freebsd-hackers@FreeBSD.ORG Sun May 30 22:25:59 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 500B81065674 for ; Sun, 30 May 2010 22:25:59 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id D144C8FC08 for ; Sun, 30 May 2010 22:25:58 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=2DJHWa-kBsMA:10 a=ygRHs6EKU7oA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=HDyF1E8vuEUzaRvr4OgA:9 a=i6fWCQaUSqujUsJnSCkA:7 a=GwLyV8Ce67O-N1nXbWj3w7BM7GYA:4 a=PUjeQqilurYA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 628261508; Mon, 31 May 2010 00:25:56 +0200 From: Hans Petter Selasky To: Kostik Belousov Date: Mon, 31 May 2010 00:23:11 +0200 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: <201005302150.15232.hselasky@c2i.net> <20100530221955.GN83316@deviant.kiev.zoral.com.ua> In-Reply-To: <20100530221955.GN83316@deviant.kiev.zoral.com.ua> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005310023.11672.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. 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:25:59 -0000 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