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

Re: [Xen-devel] [PATCH v5 3/4] xen/x86: use SYMBOL when required



>>> On 03.01.19 at 20:19, <sstabellini@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/alternative.c
> +++ b/xen/arch/x86/alternative.c
> @@ -194,7 +194,7 @@ void init_or_livepatch apply_alternatives(struct 
> alt_instr *start,
>       * So be careful if you want to change the scan order to any other
>       * order.
>       */
> -    for ( a = base = start; a < end; a++ )
> +    for ( a = base = start; (unsigned long)a < SYMBOL(end); a++ )

As said before, imo SYMBOL() should only eve be applied _directly_
to one of the (commonly linker script generated) symbols listed above,
never to any derivatives.

> @@ -1382,7 +1383,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>      }
>  #endif
>  
> -    xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
> +    xen_virt_end = (SYMBOL(_end) +
> +                    (1UL << L2_PAGETABLE_SHIFT) - 1) &
>                     ~((1UL << L2_PAGETABLE_SHIFT) - 1);

No need for the extra line split.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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