From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2 6/8] xen/x86: Reorder .data and .init when linking Date: Wed, 24 Feb 2016 11:44:11 +0000 Message-ID: <56CD978B.3030204@citrix.com> References: <1456245085-2302-1-git-send-email-andrew.cooper3@citrix.com> <1456245085-2302-7-git-send-email-andrew.cooper3@citrix.com> <56CDA50402000078000D595D@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <56CDA50402000078000D595D@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org On 24/02/16 11:41, Jan Beulich wrote: >>>> On 23.02.16 at 17:31, wrote: >> In preparation for using superpage mappings, .data and .bss will both want to >> be mapped as read-write. By making them adjacent, they can share the same >> superpage and will not require superpage alignment between themselves. >> >> While making this change, fix an exposed alignment bug. __init_end only needs >> page alignment, while .bss.stack_aligned needs STACK_SIZE alignment. > Well, this has become a bug only with your changes (perhaps > that what you mean with "fix an exposed alignment bug", but > it reads as if there was a latent one, which isn't the case afaict). It is a latent bug. The alignment directive for .bss.stack_aligned was part of .init rather than .bss > >> .bss : { /* BSS */ >> __bss_start = .; >> + . = ALIGN(STACK_SIZE); > These two lines should be swapped - there's no point in starting > the BSS ahead of the alignment, causing us to needlessly zero > a few more pages during boot. Will do. ~Andrew