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

Re: [PATCH] xen/efi: Use PrintErrMsg() rather than printk() in efi_exit_boot()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 8 Feb 2022 12:10:10 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=hQAWbIZUu8I/Hw982BplPrZjsb5S7+IUbxdTD8OgJ9o=; b=VTmGoz8tf/dxQUb2vOXnrQoM7QgDABGSq8t95Wju0JM9sLv79YE1EJzx6BulBvz80e9Ng0S1Zo2Pb7SQteAFz89cUQwJ1C0UOmWSKS0p3ovPeE2CQ6yOrv5ggastqAiUIsFQT/2P6U/6Pojibl7rSEVVMvt0b/UQLqsG4tdRPD/BJywEUue4yTgxGOcBDshFJW3r5xfkFUuLoZIwpTCxmSg3TrUWy4AsQbQcYAGdYjfvvdEQXwUPUuBV689mN1uD1ikQDXH0v+yWC01YZEELPAp5UpX47KiGZGyzGWlJuii76xeXK9LsZur+8T94Z7EdNvESxEZYeeR+eNePqEfnXw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3ucAqfwruDyvhQt9vChILajH60PEkpxSvWbCiGj2X4EULUOKSJS/Gad6aGrIby/ywhCSd1XCfKBgW+ssPnCXGwl3wsqNNgZDciWVfVWMxrHudB2JjRnqhHQNZGx++Ob785lbwKE0ucKhUkBt0Q9P8m1Ix4YJPVtbU/Lc0tzFx37lTC8ADn09mOtjvFGoQp4nzBX7DxNWOSoz9/s8nEeGLfdDG+agXEgZlfLXcj1cfigY8ebM6V9qIWVqkxbJtODAuMBUL8lLJmrf/XvMowmtKale8S8Ea09eWjQ4IB4kD3By467NQ+nWssrv77TGgkvjuxJO6UVk0nDYrjqPS797Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 08 Feb 2022 11:10:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.02.2022 11:52, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> The function efi_exit_boot() will be called within the UEFI stub. This
> means printk() is not available will actually result to a crash when
> called (at least on Arm).
> 
> Replace the call to printk() with PrintErrMsg().
> 
> Fixes: 49450415d6 ("efi: optionally call SetVirtualAddressMap()")
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

I think it was intentional to use printk() here, so I'd like to ask
for more details about the observed crash. That's also to try to
figure whether x86 would also be affected. The problem is that
without serial console configured in EFI, the output from
PrintErrMesg() is going to be very unlikely to actually be observable
(on the console), whereas the printk() output would at least be
retrievable by "xl dmesg" after the system is up.

What's worse though:

1) PrintErrMesg() invokes blexit() as the last thing. Yet we don't
   want to prevent Xen from booting; all we want is to disable use of
   runtime services.

2) I'm not convinced you can use StdErr anymore after ExitBootServices()
   was already called.

Jan




 


Rackspace

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