From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 00:32:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 724D5106564A; Sat, 27 Dec 2008 00:32:09 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 5D8658FC0C; Sat, 27 Dec 2008 00:32:09 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 1C4521A3C3A; Fri, 26 Dec 2008 16:32:09 -0800 (PST) Date: Fri, 26 Dec 2008 16:32:09 -0800 From: Alfred Perlstein To: Peter Wemm Message-ID: <20081227003209.GU18389@elvis.mu.org> References: <200812132159.mBDLxIQv040799@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r186057 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 00:32:09 -0000 * Peter Wemm [081216 20:12] wrote: > On Sat, Dec 13, 2008 at 1:59 PM, Bjoern A. Zeeb wrote: > > De-virtualize the MD5 context for TCP initial seq number generation > > and make it a function local variable like we do almost everywhere > > inside the kernel. > [..] > > --- head/sys/netinet/vinet.h Sat Dec 13 21:17:46 2008 (r186056) > > +++ head/sys/netinet/vinet.h Sat Dec 13 21:59:18 2008 (r186057) > > @@ -142,7 +142,6 @@ struct vnet_inet { > > int _isn_last_reseed; > > u_int32_t _isn_offset; > > u_int32_t _isn_offset_old; > > - MD5_CTX _isn_ctx; > > > > struct inpcbhead _udb; > > struct inpcbinfo _udbinfo; > > I'm bitterly unhappy with this. Every time these structs are touched, > either directly or indirectly, there is a guaranteed ABI breakage with > kernel modules. > > There needs to be a __FreeBSD_version bump (or something similar) > every time any of these structures change, and any kernel modules > *must* be prevented from loading. It can't be a >= some version, it > has to be an exact match. Peter, at Juniper we have what's called a "flag day" which sort of means that nothing will work past a certain point if you mix pre and post modules. Perhaps we just need a monotonically increasing kernel_flag parameter that the kernel linker will check on module load time. > With the global variable method the linker calculates the offsets at > load time. With this abomination, the knowledge of the structure > layout is compiled into the generated code with no chance of a fixup. > There are no sanity checks. If a module that referenced _isn_ctx is > loaded the old way, there would be a link error. The new way will > have it silently trash _udb instead. There's no "structure size changed" hook? I could have sworn that linker could warn about that... or are you saying that making this a global explicitly deactivates this check? > There is a whole world of hurt being unleashed here. I suspect that > we might even be possible to run out of digits in our > __FreeBSD_version numbering scheme. maybe another variable, like above would be useful. -- - Alfred Perlstein