Date: Thu, 28 Sep 2006 17:02:59 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov <ru@FreeBSD.org>, 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 ... Message-ID: <20060928170249.G690@epsplex.bde.org> In-Reply-To: <200609271752.57082.jhb@freebsd.org> References: <200609271957.k8RJv25Z028902@repoman.freebsd.org> <200609271710.51869.jhb@freebsd.org> <20060927212949.GB83490@rambler-co.ru> <200609271752.57082.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060928170249.G690>