From owner-svn-src-stable-9@FreeBSD.ORG Thu Apr 25 06:20:25 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4E63CCED; Thu, 25 Apr 2013 06:20:25 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ea0-x22e.google.com (mail-ea0-x22e.google.com [IPv6:2a00:1450:4013:c01::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 3AD331122; Thu, 25 Apr 2013 06:20:24 +0000 (UTC) Received: by mail-ea0-f174.google.com with SMTP id z16so1084939ead.33 for ; Wed, 24 Apr 2013 23:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=+OzWmW6bUCRZj9s8prSXbg7Hi0wQSxbgSsmrnSz2BJk=; b=jrTqkMSka7FLtIbE3WRshY3bZO6+KQzbwLGYpZvgor4m5RH4cdaj0Gt4rIsrieA8kx tue0v3mQpewY17WDaYDUXhdn4bnyyyXpxJ/MRo4kUtGRvuTiwEkjJB78v3Sxz9o4EI78 3WDMH2saghyw3i59ZakLjB2i3x+VTo0SEa02ZJ5r9goM5pgTM39U486P8vKnBBcirqYD oOw40vJsSiDLwnx7AHTrPUPmgjFAdLg2z7TA3M6jXopWiBJwUoQENK/DuVr1bgrt9jK7 mwct0zxD04qugZNiO8rj3RfxXAJSoQhJS+ggCjhLD6i9nTijEZUl75ZvWycFTZq1+6oQ yd3A== X-Received: by 10.15.102.3 with SMTP id bq3mr72031479eeb.42.1366870823428; Wed, 24 Apr 2013 23:20:23 -0700 (PDT) Received: from localhost ([188.230.122.226]) by mx.google.com with ESMTPSA id cb50sm8376783eeb.14.2013.04.24.23.20.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 24 Apr 2013 23:20:22 -0700 (PDT) Date: Thu, 25 Apr 2013 09:20:20 +0300 From: Mikolaj Golub To: Jeremie Le Hen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r249734 - stable/9/sys/kern Message-ID: <20130425062018.GA74007@gmail.com> References: <201304211714.r3LHEo0R075715@svn.freebsd.org> <20130424220752.GA2622@caravan.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130424220752.GA2622@caravan.chchile.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Apr 2013 06:20:25 -0000 On Thu, Apr 25, 2013 at 12:07:52AM +0200, Jeremie Le Hen wrote: > Hi Mikolaj, > > On Sun, Apr 21, 2013 at 05:14:50PM +0000, Mikolaj Golub wrote: > > Author: trociny > > Date: Sun Apr 21 17:14:50 2013 > > New Revision: 249734 > > URL: http://svnweb.freebsd.org/changeset/base/249734 > > > > Log: > > MFC r249238, r249239: > > > > r249238: > > > > Use 4-byte padding for core dump notes on both 32 and 64bit archs. > > > > Although native word padding (i.e. 8-byte on 64bit arch) looks to be > > in agreement with standards, other parts of our code and other OSes > > use 4-byte alignment. > > > > This is not expected to change alignment for currently generated core > > dump notes, as the notes look to consist of structures with sizes > > multiple of 8 on 64-bit archs. But there are plans to add additional > > notes, where 4-byte vs 8-byte alignment makes difference. > > > > Sorry, I'm a little late, trying to catch up on emails. > > I'd say this deserves a comment. Even if you commit log clearly states > the reason for this change, a casual reader may think it would be > preferable to have native alignment and fix it without thinking of > checking the SVN metadata. Note, there are several places in this file where the padding is used. Their amount has increased after r249486. I thought about adding a constant #define ELF_NOTE_ROUNDSIZE 4 to imgactl_elf.c and using it throghthout the file. I think using '4' explicetly (instead of sizeof(Elf32_Size)) should diminish confusion about native alignment and the comment is not needed then. What do you think about this? -- Mikolaj Golub