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

Re: [PATCH v2 4/5] arm/efi: Simplify efi_arch_handle_cmdline()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 23 Nov 2023 09:46:20 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=kbf0AfxFApnp8wTmzCnkGOSjBQ1ylYdJlW2MA9a0Vuc=; b=Ffpo+d53dUJKMO8fiSBby3gyhG1zxHknFJ6IlxHMjEY8bwETg6dUTAH7D4sFbGOmTJDVnmzeTPNvRVm12wyDL9XMbDPG4TEYwSRIo5dK5UvtUSSdrBKWwR/CLsVcVs3EUcIr5JpUvCBAogxarqx++0pO2QtCVzlkdwJ+nx0LTAR6zRWLFJod/pvVzMcPcWbXfizw19dkyEGnjtskIlStgQ9ONYL24LEP6noVN0mleyTypHsHE9s6LdqlJVt1of9Gdp7BTQY6Oy/maVz81m3D3n82Kci96MYmejU1Ra+wgsvWkyp9TbzEgZV2ZGVNnTZstpULbjaXebYL0ttID57BVg==
  • 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=kbf0AfxFApnp8wTmzCnkGOSjBQ1ylYdJlW2MA9a0Vuc=; b=OmtWcato3sWuBaPUD6jRnv7D86U2k7Dujx0th8FvcskPwE3oJd3MtQlKpzk605GCWTnKM4FJmgwrN4mNoKmL03GSiH4kdeCA+PMov27jXNcSS/yKCLdGI1JmifXHyZKJU3tG+qcQ6rsP6uOlx5G4a1ScF1eCOoKsmxccaKvv1+400AOqayFK0c5gFCGBfn2OlvAdp+GCTYxRG35r2nBh4CY2PAswS0ZFQTRqySAcP1Hh2MY76a6SmKiuowQnno+GpDTIFU8lqWCaKc2Er2mXBRk4p7IJavTGAddJUlagIaO5ZWrzF58tlxGOK0LFaQihXOFn2RlxrXv4IAA4jEvLFQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ZsFPFiMXrhddn+FsRr5j42iNuhm/Zcb6CfKzQWpUHBQWuhmATgxPb0tD4ICrTMXG486owAYdGXU3SwsSnpzHa7Aq17tWoVZjC1X3cZZxr94F/xzNp0bbD3hWHTqibeEEDudCa3GUuXNjCpB3vKYSDk9GlYCF6l2jFyDecZioCahpyLwRlIaLm3MQRBnINaGYtofaJxIh5hwKVg7n9n2zHn6VaxFgfbPxr1/9myLKm1+6vZIQQmXqVxZbclBr6hF7Zki4AtUQQbm/FV9m+sRCwO8zD4IhE/pCB8pef4TZVM4lLN6D+90N2cGJFriWVhDhpgvKHUNclVatZaXnp2wNXw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aPOdVMqXglUpVbrWpQY1VKGsLew/lpnGyUs4pRnTOJ8hIBSuGfdSKJ8UQfrqY1WM3flSirUAyPumEEvXYXdERpQfBA3w9qyu6VsgSk9AecLeXflr4ydqCvFe9LOZRxhFDl58Cq654r0DF85IHMrRo9iNcz7JtL1y8+dcickhucpAateLGwnpWOnZFrOlTWAy6oRqMJ+tuiTPlJuU3QJ8S2rsGGYtRTnw2UOGyYS/yp2U8NUT8N0Eatj4Cln0lW6Oo2OgVmUiOkjT2KMXaucAORNXcMlKzP17WOeMiXtG45NzarUJ4YOg+nwbtx49BxT2Yn2yOAAYeG2DQDe6xaR7Iw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Thu, 23 Nov 2023 09:47:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaHLkYgzDzOjzraUK+7wQZW0TenrCFOoGAgAACTgCAAUCpgIAAJV8AgAEHfQA=
  • Thread-topic: [PATCH v2 4/5] arm/efi: Simplify efi_arch_handle_cmdline()


> On 22 Nov 2023, at 18:03, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> 
> On 22/11/2023 3:49 pm, Luca Fancellu wrote:
>> 
>>> On 21 Nov 2023, at 20:41, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>>> 
>>> On 21/11/2023 8:33 pm, Luca Fancellu wrote:
>>>> + CC henry
>>>> 
>>>>> On 21 Nov 2023, at 20:15, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>>>>> 
>>>>> -Wwrite-strings is unhappy with assigning "xen" to a mutable pointer, but 
>>>>> this
>>>>> logic looks incorrect.  It was inherited from the x86 side, where the 
>>>>> logic
>>>>> was redundant and has now been removed.
>>>>> 
>>>>> In the ARM case it inserts the image name into "xen,xen-bootargs" and 
>>>>> there is
>>>>> no logic at all to strip this before parsing it as the command line.
>>>>> 
>>>>> The absence of any logic to strip an image name suggests that it shouldn't
>>>>> exist there, or having a Xen image named e.g. "hmp-unsafe" in the 
>>>>> filesystem
>>>>> is going to lead to some unexpected behaviour on boot.
>>>>> 
>>>>> No functional change.
>>>>> 
>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>>> ---
>>>>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>>>>> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>>>>> CC: Wei Liu <wl@xxxxxxx>
>>>>> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>>>>> CC: Julien Grall <julien@xxxxxxx>
>>>>> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
>>>>> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx>
>>>>> CC: Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
>>>>> CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
>>>>> 
>>>>> v2:
>>>>> * New.
>>>>> 
>>>>> I'm afraid that all of this reasoning is based on reading the source 
>>>>> code.  I
>>>>> don't have any way to try this out in a real ARM UEFI environment.
>>>> I will test this one tomorrow on an arm board
>> I confirm that booting though UEFI on an arm board works
>> 
>> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> 
> Thanks, and you confirmed that the first cmdline parameter is still usable?

Yes, I’m using a xen.cfg like this:

[global]
default=xen

[xen]
options=noreboot dom0_mem=4096M bootscrub=0 iommu=on loglvl=error 
guest_loglvl=error
kernel=Image console=hvc0 earlycon=xenboot rootwait 
root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd

And in Xen boot I can see this:

[...]
(XEN) Command line:  noreboot dom0_mem=4096M bootscrub=0 iommu=on loglvl=error 
guest_loglvl=error
[...]

So I think it’s passing every parameter

> 
> ~Andrew


 


Rackspace

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