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

Re: [PATCH for-4.16 v3] efi: fix alignment of function parameters in compat mode



On 19/11/2021 15:24, Ian Jackson wrote:
> diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
> index 375b94229e..089bb0eb1b 100644
> --- a/xen/common/efi/runtime.c
> +++ b/xen/common/efi/runtime.c
> @@ -638,16 +641,36 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
>  
>          if ( !efi_enabled(EFI_RS) || (efi_rs->Hdr.Revision >> 16) < 2 )
>              return -EOPNOTSUPP;
> +
> +        /*
> +         * Bounce the variables onto the stack to make them 8 byte aligned 
> when
> +         * called from the compat handler, as their placement in
> +         * compat_pf_efi_runtime_call will make them 4 byte aligned instead 
> and
> +         * and compilers may validly complain.
> +      *
> +      * Note that while the function parameters are OUT only, copy the
> +      * values here anyway just in case. This is done regardless of whether
> +      * called from the compat handler or not, as it's not worth the extra
> +      * logic to differentiate.
> +         */

Some hardtabs appear to have slipped in.

Jan gave a conditional R-by which permitted a change along these lines,
but he's left the office now too, so you'll have to take him up on that
offer if you want this committing before Monday.

~Andrew



 


Rackspace

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