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

Re: [PATCH] xen: Fix EFI buildid alignment


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 20 Nov 2025 00:43:57 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vBPIfW6iK6zy4J8PunQCqJZKDVGEefEGQ/IaJIui6e0=; b=ra5lc/kdPVV8NKgXykxzFwH2G/7R3flUax59rRqX4qtdwLviOH93n9BdswGFPH4Pwmelcwt/Fq6PRNcV+ASiS+eIk1JGgt/TBCGubIbAVE1NHwLWnFGJQP4Aa68eN4YJlK5S8Vo+ijw2BVxya+zKwGkYK5/HEuDByNZsJc3rX0f3Al7maWMAoDesSkeEJPVOp3nYTRU/9g18RvvdFS2pdumpOn0dmcGZKcbcveHMiTvRN0YN77/ZdRkdzQjMUWLwiI8sJpklDR+cOolPBBCxnT82bjOx7GVlzG2RaqfOk97/2Sh8Utpn3Wv+D+FLYSPoL92Rp9fY5ffYuWFtQu/GcA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yhe6HUwHyx1UoPCCmiVvIwOtfxKz/+6zrut1EiWU+Z6v1pGQ5pBQ+B74gpAB7BLll7iZm1iEUaVn/JK70N0NV824+jQ1nUmg9HiMiXj2j0h2gy5zGjIDSR49vn9Th/nLkI80bRuTlg657hbqPX3m0wCygHGlmEq/xeJ7QmIBPr4eRRZ/w5ZFUarFKf2AJh5eD2mvjm07WOnOBbVgJU+Svq/WWITYl3Zua8q7ADP6C5Q9tl8Iys6ez9wVIAHGlgs0JmDbKgMdT0AW474lJ7lwS/baFota3ibzO7G/eMl0XIp/LDqo5pIatd9CziC7R4dIDTQr3pNEc9oE0tpQLOUfOg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 20 Nov 2025 00:44:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19/11/2025 7:12 pm, Marek Marczykowski-Górecki wrote:
> Old binutils get confused about .buildid overlapping (in VA space) with
> earlier section. That confusion results in weird errors down the road,
> like this one:
>
>     objcopy: xen.efi: Data Directory size (1c) exceeds space left in section 
> (8)
>
> While the bug is fixed in later binutils version, force alignment of the
> buildid to avoid overlapping and make it work with older versions too.
> This can be reverted once toolchain base is raised at or above binutils
> 2.36.
>
> Details at:
> https://lore.kernel.org/all/3TMd7J2u5gCA8ouIG_Xfcw7s5JKMG06XsDIesEB3Fi9htUJ43Lfl057wXohlpCHcszqoCmicpIlneEDO26ZqT8QfC2Y39VxBuqD3nS1j5Q4=@trmm.net/
>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> Fixes: eee5909e9d1e ("x86/EFI: use less crude a way of generating the build 
> ID")

We typically put these tags in the other order.  I can fix on commit.

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, although...

> ---
> While the actual bug apparently is in binutils, the commit mentioned in
> Fixes: tag introduced part that triggers that bug.
> ---
>  xen/arch/x86/xen.lds.S | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> index 5d02f83a409c..967f9167f757 100644
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -171,6 +171,8 @@ SECTIONS
>         __note_gnu_build_id_end = .;
>    } PHDR(note) PHDR(text)
>  #elif defined(BUILD_ID_EFI)
> +  /* Workaround bug in binutils < 2.38 */

... this says 2.38, but the commit message says 2.36.  Which one is it?

~Andrew

> +  . = ALIGN(32);
>    DECL_SECTION(.buildid) {
>         __note_gnu_build_id_start = .;
>         *(.buildid)




 


Rackspace

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