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

Re: [PATCH] EFI: Fix relocating ESRT for dom0


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 11 Feb 2026 09:55:05 -0500
  • 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=1770822531; 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=1ahHpP31MwpRsY5QW3laABbm6TfJ8CRyHZKtBKrmJIc=; b=UPAP6NghrVkB6N5V3OIBhnZa39KNEdxZdJXAKb3D+17pNQGXkaoPoadpQpKkJxQJoZDSbCCv84iAhNj1Tnz76AtXApnaR1ulekZggMJ9oOQB+bykWMqW5SOL0cniKA1vbyI0chYH1L/NOA5ni+kA7veU9qSbCqI/jxjfjwMpOZU=
  • Arc-seal: i=1; a=rsa-sha256; t=1770822531; cv=none; d=zohomail.com; s=zohoarc; b=k7pcYTGnbN799BoMgNeDWB8q4tr5fiAxeKOCPGfnNg3I3qkchi3vn9wpfu/TeR7eeWgzaZ0oD19gaBkYydAvmK5aNuFhioz3VK2b8GJs08ruuNIINTjErOxUTlTo7bufvL+kKp97fNiZCs/TbnYg2PN6fj0GBn4t7ftA6AtjiII=
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 11 Feb 2026 15:09:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On February 10, 2026 7:16:42 PM EST, "Marek Marczykowski-Górecki" 
<marmarek@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>Fix calculating the table size - it consists of a header + entries, not
>just entries.
>This bug caused the last entry to have garbage in its final fields,
>including LowestSupportedFwVersion and CapsuleFlags, which (usually)
>made fwupd to detect firmware update availability, but refuse actually
>installing it.
>
>Fixes: dc7da0874ba4 ("EFI: preserve the System Resource Table for dom0")
>Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
>---
> xen/common/efi/boot.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
>index 5b84dbf26e5e..45015a0dd583 100644
>--- a/xen/common/efi/boot.c
>+++ b/xen/common/efi/boot.c
>@@ -675,7 +675,8 @@ static size_t __init get_esrt_size(const 
>EFI_MEMORY_DESCRIPTOR *desc)
>     if ( esrt_ptr->FwResourceCount > available_len / 
> sizeof(esrt_ptr->Entries[0]) )
>         return 0;
> 
>-    return esrt_ptr->FwResourceCount * sizeof(esrt_ptr->Entries[0]);
>+    return offsetof(EFI_SYSTEM_RESOURCE_TABLE, Entries) +
>+        esrt_ptr->FwResourceCount * sizeof(esrt_ptr->Entries[0]);
> }
> 
> static EFI_GUID __initdata esrt_guid = EFI_SYSTEM_RESOURCE_TABLE_GUID;


With Andy's suggestions, 

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®.