Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2006 01:29:49 +0400
From:      Ruslan Ermilov <ru@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@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:  <20060927212949.GB83490@rambler-co.ru>
In-Reply-To: <200609271710.51869.jhb@freebsd.org>
References:  <200609271957.k8RJv25Z028902@repoman.freebsd.org> <200609271703.43643.jhb@freebsd.org> <200609271710.51869.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--ZfOjI3PrQbgiZnxM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 27, 2006 at 05:10:51PM -0400, John Baldwin wrote:
> On Wednesday 27 September 2006 17:03, John Baldwin wrote:
> > Eh?  You just changed ioctl values breaking ABI all over the place, e.g=
=2E=20
> > sys/pioctl.h.  The size field changed from 0 to sizeof(int) meaning
> > different ioctl values and thus ABI breakage.
>=20
> Bah, I see you did add compat hacks for the old ioctls.  I don't see why =
we=20
> don't just fix the original ioctls to just use IOCPARM_IVAL() and be done=
=20
> with it, why do we have to add _IOWINT() and other hacks?
>=20
> > Plus, what if you have:=20
> >=20
> > 	struct foo {
> > 		int bar;
> > 	};
> >=20
> > #define FOOIO	_IOW('y', 0, struct foo)
> >=20
> > that's going to have the same issue isn't it?
>=20
> Ok, see now why this works.  This is only for ioctl's that use int w/o=20
> specifying it (i.e. take an int directly instead of pointer to int).
>=20
> > I think instead the various ioctl handlers have to realize that for IOC=
_VOID=20
> > ioctls declared using _IO() data is a (caddr_t *), not an (int *) (the =
uap=20
> > struct for ioctl clearly defines data as a caddr_t).  Fix whatever crap=
 you=20
> > have to in the kernel to deal with it, but don't change the userland AB=
I. :(
>=20
> I still think doing this (via IOCPARM_IVAL()) is best and is probably a m=
uch=20
> smaller diff.
>=20
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.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--ZfOjI3PrQbgiZnxM
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFGu1NqRfpzJluFF4RAvfsAJwIFJYpBKJAg/ayA9iYaxDH2PnhKwCeOUH9
B6QkuX/z2jZO3S89hwUe0Io=
=TfXP
-----END PGP SIGNATURE-----

--ZfOjI3PrQbgiZnxM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060927212949.GB83490>