On 12.09.2023 17:39, Simone Ballarin wrote:
> --- a/xen/arch/x86/percpu.c
> +++ b/xen/arch/x86/percpu.c
> @@ -12,7 +12,7 @@ unsigned long __per_cpu_offset[NR_CPUS];
>   * possible #PF at (NULL + a little) which has security implications in the
>   * context of PV guests.
>   */
> -#define INVALID_PERCPU_AREA (0x8000000000000000L - (long)__per_cpu_start)
> +#define INVALID_PERCPU_AREA (0x8000000000000000UL - (long)__per_cpu_start)

Looking at this change the n-th , I can't help considering the result
inconsistent. Imo either the cast also wants changing, or the constant
wants to become -0x8000000000000000L (in whichever way is appropriate
to express it without violating any of the sometimes picky Misra rules;
maybe ~0x7fffffffffffffffL would work).

Jan

Reply via email to