Hi Both,

> On Nov 22, 2023, at 04:41, Andrew Cooper <andrew.coop...@citrix.com> wrote:
> 
> On 21/11/2023 8:33 pm, Luca Fancellu wrote:
>> + CC henry
>> 
>>> On 21 Nov 2023, at 20:15, Andrew Cooper <andrew.coop...@citrix.com> 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.coop...@citrix.com>
>>> ---
>>> CC: Jan Beulich <jbeul...@suse.com>
>>> CC: Roger Pau Monné <roger....@citrix.com>
>>> CC: Wei Liu <w...@xen.org>
>>> CC: Stefano Stabellini <sstabell...@kernel.org>
>>> CC: Julien Grall <jul...@xen.org>
>>> CC: Volodymyr Babchuk <volodymyr_babc...@epam.com>
>>> CC: Bertrand Marquis <bertrand.marq...@arm.com>
>>> CC: Roberto Bagnara <roberto.bagn...@bugseng.com>
>>> CC: Nicola Vetrini <nicola.vetr...@bugseng.com>
>>> 
>>> 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

Reply via email to