|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/6] Align all sections to 4KB
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |