From owner-svn-src-all@FreeBSD.ORG Thu Nov 12 14:31:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7BF71065672; Thu, 12 Nov 2009 14:31:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id A3F208FC1D; Thu, 12 Nov 2009 14:31:18 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B9DEB6D41C; Thu, 12 Nov 2009 14:31:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 8AABA84513; Thu, 12 Nov 2009 15:31:17 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911112130.nABLUw9b007768@svn.freebsd.org> <20091112135211.GT64905@hoeg.nl> Date: Thu, 12 Nov 2009 15:31:17 +0100 In-Reply-To: <20091112135211.GT64905@hoeg.nl> (Ed Schouten's message of "Thu, 12 Nov 2009 14:52:11 +0100") Message-ID: <86hbsz24sq.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r199201 - in head: contrib/libpcap sbin/ifconfig share/man/man4 sys/kern sys/net sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 14:31:19 -0000 Ed Schouten writes: > Xin LI writes: > > @@ -198,6 +198,7 @@ struct ifnet { > > void *if_pf_kif; > > void *if_lagg; /* lagg glue */ > > u_char if_alloctype; /* if_type at time of allocation */ > > + struct sbuf *if_description; /* interface description */ > >=20=20 > > /* > > * Spare fields are added so that we can modify sensitive data > > @@ -205,7 +206,7 @@ struct ifnet { > > * be used with care where binary compatibility is required. > > */ > > char if_cspare[3]; > > - void *if_pspare[8]; > > + void *if_pspare[7]; > > int if_ispare[4]; > So there used to be four chars in a row here (between if_description and > if_cspare). Are you sure moving the pointer in between doesn't increase > the structure size? I can guarantee you that it does. On i386, for instance, there are now three bytes of implicit padding between if_alloctype and if_description, and one more between if_cspare and if_pspare, so struct ifnet has grown by four bytes. We should have CASSERTs for sizeof(struct ifnet) and other structs we really care about. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no