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

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 10 Nov 2021 08:40:48 +0100
  • 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=2xb6oeZURi1BjOi+lhkPpWY/Axvg0uHMw9sQrKjibRU=; b=XTa0Jw9PZYynTVNS+h1EGX6bN1OP9P9/UM78O6PeFt1Vm5jNU7pwtm2yDp20RFJwpv+NqPjShYT6gdspPVrMASHPlS1Wj2DO1tAGlk2OVhjWu2SO+uVrXdf13VgacevTjFB9j3q5Gecmu/zS0hoDATPQelEolgLNYfSfBsZa42daY/PKnuva0OU8jgFXewe+5uiSeb06c3B2HoPqF1PItjIyvuCzs3OAvxhbABlDcIlYnMTRVlqjddhrwb6Wso3uPqeaKLxb278ijz9UzF9UEhY81LUOj9zh7RUygEJDLxOkQDtNwtGHtV/McKWr8RS2mTIGrilvgyHUOTCiPEb5TQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TycyWrBhf7W/rG40YfZCXdYOCbIXjXO1XtRNzmJB8tymFa2vfy2fOG1P/+55s75rmvjJ7HtRLzXo+PSBzacq+kcz4GO2+GZZNpjKajDQoZGeUuSN0rlG8ZEYGdDyaKPHcFNpHUGw+yjd/7QQC3QEX0sUENtsvOcvhnboW/wobghW03qjDfVYRaCx4UxXNxjf5NBobiflztOqfKsvfAGZ4+jWNXRZEdItHx7VAgCt+6KoWlTazuit5J9+fvaH3hQa9ienpoZkpAHjO5pN5OStHoY+nOGq/Ik6Nd83bRP24nFGsj77FNTN7L7EINmmX1xOrkww1pnz3nqhf7d3geJ9fw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, wei.chen@xxxxxxx, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Luca Fancellu <luca.fancellu@xxxxxxx>
  • Delivery-date: Wed, 10 Nov 2021 07:41:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.11.2021 22:52, Stefano Stabellini wrote:
> @@ -862,6 +856,7 @@ static int __init efi_check_dt_boot(EFI_LOADED_IMAGE 
> *loaded_image)
>  {
>      int chosen, node, addr_len, size_len;
>      unsigned int i = 0, modules_found = 0;
> +    CHAR16 *fname;
>  
>      /* Check for the chosen node in the current DTB */
>      chosen = setup_chosen_node(fdt, &addr_len, &size_len);
> @@ -871,6 +866,8 @@ static int __init efi_check_dt_boot(EFI_LOADED_IMAGE 
> *loaded_image)
>          return ERROR_DT_CHOSEN_NODE;
>      }
>  
> +    dir_handle = get_parent_handle(loaded_image, &fname);
> +
>      /* Check for nodes compatible with xen,domain under the chosen node */
>      for ( node = fdt_first_subnode(fdt, chosen);
>            node > 0;
> @@ -902,6 +899,8 @@ static int __init efi_check_dt_boot(EFI_LOADED_IMAGE 
> *loaded_image)
>          efi_bs->FreePool(modules[i].name);
>      }
>  
> +    if ( dir_handle )
> +        dir_handle->Close(dir_handle);

Weren't we there before, resulting in the same problem that Luca's
change attempted to fix? get_parent_handle() simply shouldn't be
called unconditionally aiui. I could see closing of the handle to
happen here, but its opening imo should happen the first time
allocate_module_file() is actually reached.

Jan




 


Rackspace

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