[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>, Luca Fancellu <Luca.Fancellu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Thu, 23 Nov 2023 04:20:15 +0000
- Accept-language: zh-CN, 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=9rAr0A5fObGJXVvJArbZdfn7pLDwYVj5hmUUy/EP21k=; b=JEe0ULwCPvtLi0Blt9v/66OhEUSdyaPcoWKWzjLBa8DPaVigO5VcYif/SkHYWPNpPFysNpVkwth0S/Wnr/pKLmATZfIy4skdMwiEEK4pnBjeabWV5DoQiIDkHnYiCB8Ts/la1o9jIuKeGNJMRl3KiLzRi+jZnuC5aGwE815bGqvuknB3jlIBqC0G0RQgdSIynpRyuTwph+VG6OdJtocfvjDLkswHvIo9K2mmjkGEGqi8GB9tQZhWZVVkduftzUj16vSgZV4qHnQIk0wt9FdUGeueHYaOocUJv7u7jwUx2i7lMmYKDc94gPR4oPVLH2fTz3ndUULSLeak1ouBUyhWCg==
- 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=9rAr0A5fObGJXVvJArbZdfn7pLDwYVj5hmUUy/EP21k=; b=mXIPTGbzJXqYZhI2KbtN8THMlCcvMTHYCei+6x/g7RXsiJnd6m4K56he5AgYzSiyNBUK+PJRE+ElbK6XFq+K0fPA2IIGAgUygjhbA1B/4IqLJBtx2jM9IaMXq63wROHyMvjdqSjJnKHj+fM9SyoCnccVK+CcwNV00KFlEhxcRWA/U3miYpt7/BchaKJJhV/4CMEf2dgiKHwsTyrKPnclE+SFu48mOamygfY5hS1XEnJtNfBanp5Kc1PG50fMVyhWWMHeKR+hOuNM23HAAM4Z4QC9AO7g4SNtByPdvn5DVXhu5eMTjsvWGRDplUeGtaW8hsAK62rdHrGOSNRQt2E1RQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=JqoaZErUhlqHcsp6JsrGCmwiDhQ4YnQiDbhdR9kVotkCd8M7p4M/VM+RC4uAy4oZURDqnfe7La4PfZpLolJMdKSVFIYoOalHqmGT2JSLJXDfKMwSnuoCH5GEF4kllfLlN343zkop+YE+ufdTwL8V1+tD3Mp+/ikSLSNdKlD6FtP7e8FvenBQisqdtq2GUVGTIxytfyGhYdgogKDH4GswN7VGA5ddtPpS7tdORVQgrAUIDtnQsmqK2rGNb8OSDVnHTqI6DTyWnqv5ZwWZxOlYsgNhs5Rrsy2vZ14N9OSLSqSMv4r6jtpjQTcHTA0OWNBvnNa3NEo0KnnDqcuDYA56Ng==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ejeA1CS4oMzJ0vD79La8NlR2r6+F+cq8M1SqeP4pcjCL7mHlxY5HZgXJku0RoELskDHpVdl+GpDbwFR7oYGFpxeaLD31c2QM9m3xFUhoKtBrm2WU2C7AZdLn2Z4r1FgTIFlJ4wmEX0DdYcaF9/jpK5BwLrq43bo2+r+TrwsR2yrLJ3m+d+zVjbbvivKZXHIMNG6gzvtQl9ZVshJL97PEniVz9BuNjcBOrhLbqIxYFR6qxlyQB05JkJKXKTF9kmrk0/VMJCHh7wjcZzMnPsQoqB0M8OM80wWXKbKx/IkdPsCNVvQGvtZS25ERi8VoSQawXOouGiLmdFlwX5SRIQNgow==
- 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>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Delivery-date: Thu, 23 Nov 2023 04:20:55 +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: AQHaHLke0d1pJZFGt0mE36h4hBLGpbCFOo4AgAACQQCAAUC2AIAAJVIAgACsX4A=
- Thread-topic: [PATCH v2 4/5] arm/efi: Simplify efi_arch_handle_cmdline()
Hi,
> On Nov 23, 2023, at 02: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>
>>>>> ---
>>>>> 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?
Today I tried this series on an N1SDP board using UEFI boot. I had a device
tree with
xen,xen-bootargs = "console=dtuart dtuart=serial0:115200n8 noreboot
dom0_mem=1024M bootscrub=0 iommu=no";
Xen can be successfully boot on the board with the series applied, and I got
```
(XEN) Command line: console=dtuart dtuart=serial0:115200n8 noreboot
dom0_mem=1024M bootscrub=0 iommu=no
[…]
```
Also I can interact with the board:
```
n1sdp login: root
root@n1sdp:~# ^C
root@n1sdp:~# ^C
root@n1sdp:~# ^C
```
So I think the first cmdline parameter is still usable. I will wait for Luca to
confirm on his
side as I believe he used a different board in his test.
Tested-by: Henry Wang <Henry.Wang@xxxxxxx>
Kind regards,
Henry
>
> ~Andrew
|