Date: Tue, 29 May 2007 21:22:13 +0400 From: Yar Tikhiy <yar@comp.chem.msu.su> To: Scott Long <scottl@samsco.org> Cc: freebsd-current@freebsd.org Subject: Re: HEADS UP: KBI breakage for Ethernet modules Message-ID: <20070529172213.GG53113@comp.chem.msu.su> In-Reply-To: <465C444F.2050505@samsco.org> References: <20070529131758.GB53113@comp.chem.msu.su> <465C444F.2050505@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 29, 2007 at 09:18:39AM -0600, Scott Long wrote: > Yar Tikhiy wrote: > >On Sun, May 27, 2007 at 03:51:29PM +0400, Yar Tikhiy wrote: > >>As discussed earlier on -net, I'd like to commit the following > >>patch. It will bring ether_ioctl() into accord with ioctl() WRT > >>the type of the command argument. In our ioctl(), command became > >>an u_long ages ago, but ether_ioctl() has never been fixed. With > >>int and u_long being of different widths on 64-bit arch'es, the > >>discrepancy can get us in trouble sooner or later. > >> > >>In fact, ioctl command coding is very unlikely to change, so it > >>will continue to fit in 32 bits. OTOH, the C compiler should be > >>uneasy about squeezing u_long into int when ether_ioctl() is called > >>from an if_ioctl handler, so this patch will be a little step on > >>the way to a warning-free kernel. > >> > >>This change will inevitably break the kernel interface to network > >>modules, so all of them will need rebuilding. > > > >I received several positive replies and no negative ones, so the > >change has just been committed. In fact, it breaks KBI on 64-bit > >platforms only. (Thanks to Ruslan Ermilov for reminding me about > >that.) Many thanks to those folks who encouraged the change. > > > >Now all Ethernet-related kernel modules need to be rebuilt on 64-bit > >platforms. The conventional "make buildkernel" procedure will take > >care of stock modules, so only 3rd-party modules need some attention. > > > > How does this affect 32-bit compatibility on amd64? It shouldn't at all. The ether_ioctl() function is to be called by Ethernet drivers only, and they get the ioctl command as u_long via their ifnet.if_ioctl handlers. I guess that 32-bit compatibility is provided by an upper layer, such as the socket layer. -- Yar
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070529172213.GG53113>