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

Re: [PATCH 1/3] x86/EFI: Fix detection of buildid


  • To: "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>
  • From: Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 29 Jul 2025 12:16:24 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753805792; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=hE5enLcHVRCqrHEicpatiepfiXU7ksxznA5fszG0bwg=; b=lBRP9e07nxXHxnPGeM71qNctYn69AgyqJwhfXU0ONm5pxU69iUXQUFA8XlRyhJLhBS1uLJPShK8UMBESj97XHofHdNQh3Rrj1/VHOd6LM7qwevElHT1ULJ2S9BeLxv2ARt54UxZmy3nYLKdi1jO1xGgtQ05GuZ+imt6WzV4C930=
  • Arc-seal: i=1; a=rsa-sha256; t=1753805792; cv=none; d=zohomail.com; s=zohoarc; b=VUDr3uwk1z+FIHGbkDUKHRhwXmMzv61flb+vM9IuXCoQejHG7TCHNdC8w5CmrIHiltSuku6E6Pmah43U5V2KOBpwwICiGa+Z6KQEdy5v0Q3ZCXj8c57JGl7UQazoDiQLoar1vrXtaIBcM6pwW6/Bhak3TmSLQMiE3OJpYYR4occ=
  • Cc: "Xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Ross Lagerwall" <ross.lagerwall@xxxxxxxxxx>, "Jan Beulich" <JBeulich@xxxxxxxx>, "Roger Pau Monné" <roger.pau@xxxxxxxxxx>, "Marek Marczykowski-Górecki" <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 29 Jul 2025 16:16:43 +0000
  • Importance: Medium
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

---- On Thu, 05 Jun 2025 07:16:36 -0400 Andrew Cooper 
<andrew.cooper3@xxxxxxxxxx> wrote ---

 > The format of the buildid is a property of the binary, not a property of how 
 > it was loaded.  This fixes buildid recognition when starting xen.efi from 
 > it's 
 > MB2 entrypoint. 
 >  
 > Suggested-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> 
 > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 
 > --- 
 > CC: Jan Beulich <JBeulich@xxxxxxxx> 
 > CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> 
 > CC: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> 
 > CC: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> 
 > CC: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> 
 >  
 > I don't like this patch and tried hard to do it in a better way, but the EFI 
 > aspects of the build system are too intractable. 
 >  
 > While on x86 I can in principle pull the same common-stubs.o trick, split on 
 > XEN_BUILD_PE rather than XEN_BUILD_EFI, that doesn't work on ARM which 
 > hand-codes it's PE-ness.  Also, it's really not EFI related, other than as a 
 > consequence of that being the only reason we use PE32+ binaries. 
 >  
 > Binutils 2.25 is now the minimum, and the makefiles can be cleaned up 
 > somewhat, but I need to backport this patch, internally at least. 
 > --- 
 >  xen/common/version.c | 7 +++++-- 
 >  1 file changed, 5 insertions(+), 2 deletions(-) 
 >  
 > diff --git a/xen/common/version.c b/xen/common/version.c 
 > index 5474b8e385be..56b51c81d2fc 100644 
 > --- a/xen/common/version.c 
 > +++ b/xen/common/version.c 
 > @@ -203,8 +203,11 @@ void __init xen_build_init(void) 
 >  rc = xen_build_id_check(n, sz, &build_id_p, &build_id_len); 
 >  
 >  #ifdef CONFIG_X86 
 > -    /* Alternatively we may have a CodeView record from an EFI build. */ 
 > -    if ( rc && efi_enabled(EFI_LOADER) ) 
 > +    /* 
 > +     * xen.efi built with a new enough toolchain will have a CodeView 
 > record, 
 > +     * not an ELF note. 
 > +     */ 
 > +    if ( rc ) 
 >  { 
 >  const struct pe_external_debug_directory *dir = (const void *)n; 
 >  
 > -- 
 > 2.39.5 
 >  
 > 

>From what I can see, thre are no longer objections and two Rb's ackowledging 
>this is the best path forward. I do not see an issue with it myself.

Acked-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>




 


Rackspace

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