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

Re: [PATCH v4 3/3] arm/efi: load dom0 modules from DT using UEFI


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 1 Oct 2021 13:16:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=J88066DRHprCmPmq6onKz4kV4U88D+q7ClEowJcpkBE=; b=ibZ1cS0rPTm5lJ+XpNu5am2qvMLA4l+ArOdyo4g2AQnzDWZfLqHmF54HnQlJ1bu49eA2NKObUream1nYKg1q89w+T6bU10z7u0sHIW1cdreOT62oGYwWtK/8cStbS5gvC2lrROSUN3lZwZqqughyBA2jnoHTpafLdzou+WAqgQiley4N5PDu4JeyhFI+JwW3wJxPEWM9vMb3J4cPpnx0PpVwlUNGk+ZDq0p8gKDmZh8ukoVGI/JLLHhcBDY4fGd0iPkdThSTteK1mD1mDXPdYTgf1n6awTUrWO3OzZRN5rjw0wI1XrhW9fIgjYoYVTt0aY3Ii7XFd7ItAn9W+QmzzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZ6Xc+3cAW+y9BcO1XxCesIq6alphxZZYh5aQNppn1It/yMtY+jpyWYnohdOXXhbr4YzLQPDmrsRD53qyKBHxmzbSWYSX4eiqlmTbJleWsjHBfyH5aQ7TbIfm8eO7VBYTLpaVyPedHrwAXAYQ45LrgTznXSWX8sRfiEBhZnpU++rtAor0Sy0aEiVQwYgtupUE9g9CRaf74UWo75D1FUBtVxQVg+vQx75/5eiUT82by1p5oFNMSn7gV16P39n4rzYREaBnSsBrlp50mm3fm/vH5GOHoAF7MrBpjekLRackYqlCWCY3gcxGWOqsqiysc2IL/WzhkwqBNnzd9nIBkNI7g==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: bertrand.marquis@xxxxxxx, wei.chen@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 01 Oct 2021 11:16:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.09.2021 16:28, Luca Fancellu wrote:
> Add support to load Dom0 boot modules from
> the device tree using the xen,uefi-binary property.
> 
> Update documentation about that.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
despite ...

> @@ -1385,6 +1380,17 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE 
> *SystemTable)
>      if ( !dt_modules_found && !kernel.addr )
>          blexit(L"No Dom0 kernel image specified.");
>  
> +    /*
> +     * The Dom0 kernel can be loaded from the configuration file or by the
> +     * device tree through the efi_arch_check_dt_boot function, in this stage
> +     * verify it.
> +     */
> +    if ( kernel.addr &&

... me still being a little unhappy with the inconsistent use of the
union fields so close together: This one is now consistent with the
one visible further up in context, but ...

> +         !EFI_ERROR(efi_bs->LocateProtocol(&shim_lock_guid, NULL,> +         
>                                   (void **)&shim_lock)) &&
> +         (status = shim_lock->Verify(kernel.ptr, kernel.size)) != 
> EFI_SUCCESS )

... is now inconsistent with this use. But yeah - read_file() is
even worse in that sense, except that there the different uses are
for specific reasons, while here the only requirement is to satisfy
shim_lock->Verify().

Please feel free to retain my ack in case you decide to use .ptr in
all three places.

Jan




 


Rackspace

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