[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>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Wed, 22 Nov 2023 01:31:10 +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=2NeEvXvgiFb9cKJ0ps5RkrwdrOx4jX3PP5/CeFgbPlk=; b=XInnceH64J6tC9pmAR2BiuRcMxIV6fQMtLMrzOH1LHZQix8mREIg8VFVCDiToryuO55LV9oiYHqL705YnVqmTwDwsKyaqrr04xuW646i3XrgskRlJDAeGxxmeBi02L+yZqFcSVMw99LPiwCEKquEMqB6wMGBdYvKqb2MEm0CuBi3TQ3eBGWxenr55vcdDc0lZzxL2Ktav7ca/Q2oiqxcw00AkysV9Oli6g4ZGI1Ytcb6+1S0zBk4xNgyORkcowYTwlemQ3fWa1a7caikUUNH6kL8DnaxAZhlPXGmXVvSXsCDPZVUrlWUf4WGn9cE5OdOhRXE4qN+yjbiaKppRpbYlg==
- 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=2NeEvXvgiFb9cKJ0ps5RkrwdrOx4jX3PP5/CeFgbPlk=; b=brHMw+HSHCExCw/shg77zFUr8pjKygFpuYkhGe3ulb4YLnvVSnJsXRidd8kScFyAHKGke3vrlXMs83PLLkx24R4l5MSxOwHN0cdtcnah93Cqh0KIob7a24/fM+KvyIBD6obwN71wfgyWDd+Iad/43aGJzFSTdb6gUoRadM6zibTy00h4qGVYaPKsp/8cyqgBFjRPk6qKcmU8XcLgtpB0JY4hBePvwMWtuCbgTOBHItiTPYU1IC5SJF9AHdRtgsAzlMNALnMMGe8DR5f621zUGf2a5k4tNEW6K3+PL8/xX5RoWZxgKl7wfoeeskYM7rKi8irC/IM33W+9GvCmqzEnXA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=aScLD5cn87gxnrzKp0i3olQ7umL4tjmB+FeE0iXcu8PYQ21U378boHLPlz5oRYAgy/J07JcpW6loJYSJ6285SDvkmnOD/aI7kA8YfP3056Y2C7+12MiWcgLuHPvi5TRmEzvabqOGhKYCrNO1qm5I8HEPvyKebU6UEPyujktE62Hzwd5ipkDUlPjHaLpk6eRJqal7AMJ2lgKd0iUxwlEVTapndYaQdQLzS4Wk8+p855OLhgA7YUN8Wxtlm5zP/gSPkHS+flZQJ0gjjyXJGjevNUXwlsZMQD+4bTDWT0OLjMpPmfiApmP36ZCGxGv4QtNzxwA68Bpp5mF8rTxNfescVA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDGxxGfedS+1UD8cB0sewkK8iLQyIqSBrQYYfav8m675mbXhXQovDNw/jnrGmy16p+1/htaqvjXiTO1ZrgOVYFLrAu3Qtsskbx5bcV6Kb82onZ/ocCKlCHk5E96F82PTxBcMq1EK6k6OkiIR31AK7i0weTqsAQyBDfBsLUjpjtasp4pD5KjBWxEY7r12N+4kV8b0MM7k1iGvciWlyEF9X6T6h9Z34RsGX/yszBj9ldPXBABbxFRTT5rUjFoC4bdDTPz2zyqcq5nZ5ZD1E3bjzf/oQnaczCMMPCWRxmQymn09ykxM37AyRXDoibAUyXk21kS88eqOGjfs5NRiDgSMNA==
- 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>
- Delivery-date: Wed, 22 Nov 2023 01:31:59 +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: AQHaHLke0d1pJZFGt0mE36h4hBLGpbCFOo4AgAACQQCAAFDVAA==
- Thread-topic: [PATCH v2 4/5] arm/efi: Simplify efi_arch_handle_cmdline()
Hi Both,
> On Nov 22, 2023, at 04: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
>
> Thanks. I have a sneaking suspicion that:
>
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index 9b9018574919..8bca5b9a1523 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -46,6 +46,12 @@
> #include <xsm/xsm.h>
> #include <asm/acpi.h>
>
> +static int __init parse_ucode(const char *s)
> +{
> + panic("Xen image name interpreted as a cmdline parameter\n");
> +}
> +custom_param("xen.efi", parse_xen);
> +
> struct bootinfo __initdata bootinfo;
>
> /*
>
> will trigger.
I saw I am CCed for this patch, so I think I am now going to throw this series
to our CI and see if it explodes. Do you want me to also include above hunk?
Kind regards,
Henry
>
> ~Andrew
|