[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/6] Align all sections to 4KB


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Frediano Ziglio <freddy77@xxxxxxxxx>
  • Date: Thu, 4 Jun 2026 11:16:49 +0100
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=3g2FJuhmtw1p1grCzFRLprBtPRu9/Gw6Z11ZYhXMP/k=; fh=P4u/IhpfK7clP8z1s5Ol+HHE8whEXfpZ9+vnjbgCW9Q=; b=BSptCTgdxppBka+8r1bCBUzeGw+/6khmNmk4+hy+xuseky08aQn8a3KZhb7xzI4HqC bzq7L3B/ixywmK3yr9OP9IL8WRmdXvQLhbWc7laD9CIuEELRYN6pZKz7l1Xt1/gCQZ2G QBNuFhqMg5JA1TSB0DfDHUZsQz383PjDjAcFFtb0VBY2x9PYj6XgSjv9FzRZ+U1DhkF0 z8LZR4CuHXDOUpnf4PhRWRM3fhyFG1mxypdrvZgtVimV6Cx0fHLlVT4Ofcp06XAAnxHO QTkZ5ygMsMiMoxEHAPmyuv/ew2BPnPzeyJb8wf+JX63wuPvX+lK1Oab1pgbCU3rt6xWt 5TOQ==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1780568222; cv=none; d=google.com; s=arc-20240605; b=cxwFEk645IfQidGJLOrN3n6XB37OpkmfG6qj+kvzPRCDeoEelYGl3WqYsjgzFueHen cYRJKCr9JIAbLftwJ3eLYY3q22jyh4L1x0+GYh8epnsy4n9O+oLlMUb9Oe8l98dUAnXJ JRLOl4P+PdT+OFwpcKNAFzu2CzeVxnG2mAsQXnmYNW54k9fUjH5Bukw6XzQeezLFgFZf 0cTKOVKoKnMarcQfYKqRZkD3lXTSmOXerhXacZf0yKLjaDkHjHg/CkkmMLnthKOHVZ5w V/uiHPcO9/Ft6UvzidgspWPynu3Z+4V4xWg1gBIRGosly0mTQ0ZznWOY9XoGYZInJ2jG Fq6A==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 04 Jun 2026 10:17:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, 2 Jun 2026 at 13:09, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 29.05.2026 17:35, Frediano Ziglio wrote:
> > Required by UEFI CA memory mitigation.
>
> Imo this isn't enough for a description: At the very least you want to
> point at where that requirement is spelled out. Additionally: How much
> of an image growth is this going to be? Considering that elsewhere it
> was already said that xen.efi is too large for certain purposes (and
> hence e.g. debug info wants stripping there), size increase is a
> potential issue.
>

I'll integrate Andrew comment on the description.
The image will increase but if it's a problem just adding some kbytes
it would be a pretty big deal.
If I remember the issue was more if the image was not stripped and in
this case it was like 10 times bigger, not just a bit bigger.

> > --- a/xen/arch/x86/xen.lds.S
> > +++ b/xen/arch/x86/xen.lds.S
> > @@ -162,8 +162,8 @@ SECTIONS
> >         __note_gnu_build_id_end = .;
> >    } PHDR(note) PHDR(text)
> >  #elif defined(BUILD_ID_EFI)
> > -  /* Workaround bug in binutils < 2.36 */
> > -  . = ALIGN(32);
> > +  /* align to satisfy UEFI CA memory mitigation */
> > +  . = ALIGN(PAGE_SIZE);
> >    DECL_SECTION(.buildid) {
> >         __note_gnu_build_id_start = .;
> >         *(.buildid)
> > @@ -330,6 +330,7 @@ SECTIONS
> >    __2M_rwdata_end = ALIGN(SECTION_ALIGN);
> >
> >  #ifdef EFI
> > +  . = ALIGN(PAGE_SIZE);
> >    .reloc ALIGN(4) : {
> >      __base_relocs_start = .;
> >      *(.reloc)
> > @@ -355,6 +356,7 @@ SECTIONS
> >    VIRT_START &= 0;
> >    ALT_START &= 0;
> >
> > +  . = ALIGN(PAGE_SIZE);
> >    .sbat (NOLOAD) : { *(.sbat) }
> >  #elif defined(XEN_BUILD_EFI)
> >    /*
>
> You say "all sections" in the title, yet this is not covering e.g. debug
> info.
>

I will change to "all loadable sections". debug sections are not
loadable so they don't cause an issue.

> Jan

Frediano



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.