From owner-cvs-all@FreeBSD.ORG Thu Sep 28 07:03:04 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7F1416A417; Thu, 28 Sep 2006 07:03:04 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B15C43D49; Thu, 28 Sep 2006 07:03:04 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 8119C702EE; Thu, 28 Sep 2006 17:03:02 +1000 (EST) Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id k8S730eU016367; Thu, 28 Sep 2006 17:03:01 +1000 Date: Thu, 28 Sep 2006 17:02:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: John Baldwin In-Reply-To: <200609271752.57082.jhb@freebsd.org> Message-ID: <20060928170249.G690@epsplex.bde.org> References: <200609271957.k8RJv25Z028902@repoman.freebsd.org> <200609271710.51869.jhb@freebsd.org> <20060927212949.GB83490@rambler-co.ru> <200609271752.57082.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/atkbdc atkbd.c src/sys/dev/digi digi.c src/sys/dev/kbdmux kbdmux.c src/sys/dev/syscons scvidctl.c syscons.c src/sys/dev/uart uart_kbd_sun.c src/sys/dev/usb ukbd.c src/sys/dev/vkbd vkbd.c src/sys/fs/procfs procfs_ioctl.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2006 07:03:04 -0000 On Wed, 27 Sep 2006, John Baldwin wrote: > On Wednesday 27 September 2006 17:29, Ruslan Ermilov wrote: >> On Wed, Sep 27, 2006 at 05:10:51PM -0400, John Baldwin wrote: >>> I still think doing this (via IOCPARM_IVAL()) is best and is probably a > much >>> smaller diff. >>> >> You don't consider that many ioctls are initiated inside the kernel, >> and this kernel code already uses (and passes) pointers to "int". >> While we could fix all of our kernel (and my first patch did exactly >> this), it's 1) very inconvenient, and 2) we cannot fix third-party >> kernel code this way. > > Could you avoid IOWINT by just assuming that any _IO() ioctl is getting an int > as the arg? If an ioctl doesn't use the arg, then you don't lose anything.. No -- see ru@'s reply. > do we have any ioctl's that use the arg directly but not as an int? The > ioctl(2) manpage implies that 'data' is either a pointer or an int. If you > go this route, you avoid changing all the ioctl values, basically just assume > that IOC_VOID means the argument is an int. The point of changing all the "void int" ioctls that actually pass an int to use _IOWINT() was to get away from the horrible (kernel) API and (user and kernel) ABI for them. The API is so horrible that there were no instances of correct use of it. The complications for using it are now mostly handled in IOCPARM_IVAL(), but we wanted to inhibit future uses of "void int" so so changed the ABI so that new (user) binaries use _IOWINT(). The ABI is still horrible because there aren't enough bits to encode the types in a nice way. Bruce