From owner-svn-src-all@FreeBSD.ORG Wed Aug 11 09:13:12 2010 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 6195D1065670; Wed, 11 Aug 2010 09:13:12 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1F9568FC13; Wed, 11 Aug 2010 09:13:11 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 13DF11FFC33; Wed, 11 Aug 2010 09:13:10 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9628584528; Wed, 11 Aug 2010 11:13:10 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <20100810.120103.69891821625677670.imp@bsdimp.com> <201008101956.o7AJu5ms044774@haluter.fromme.com> <20100810.141958.923962171922746057.imp@bsdimp.com> Date: Wed, 11 Aug 2010 11:13:10 +0200 In-Reply-To: <20100810.141958.923962171922746057.imp@bsdimp.com> (M. Warner Losh's message of "Tue, 10 Aug 2010 14:19:58 -0600 (MDT)") Message-ID: <86fwylecm1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@FreeBSD.org, jilles@stack.nl, svn-src-all@FreeBSD.org, olli@fromme.com, olli@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r211023 - head/usr.sbin/syslogd 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: Wed, 11 Aug 2010 09:13:12 -0000 "M. Warner Losh" writes: > You'll find that a number of structures are potentially already > allocated with less than required alignment. There's about a dozen > places in the tree that would start to fail if we did this, or the > stronger form of __aligned(8). We could add that to the other > structures, but then we're breaking ABI rules, I think. __aligned(4) won't affect struct addrinfo since the sockaddr immediately follows a socklen_t, which is 32 bits wide and has 32-bit alignment. A sockaddr_* allocated with malloc() will already be aligned, and so will a sockaddr_* created on the stack. The only problem is sockaddr_un, because its size is not a multiple of 4, so if you allocate an array of sockaddr_un, every other element will be misaligned. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no