On 08.03.2022 16:36, Bjoern Doebel wrote:
> --- a/xen/arch/x86/livepatch.c
> +++ b/xen/arch/x86/livepatch.c
> @@ -339,7 +339,7 @@ int arch_livepatch_perform_rela(struct livepatch_elf *elf,
>  
>              val -= (uint64_t)dest;
>              *(int32_t *)dest = val;

Afaict after this assignment ...

> -            if ( (int64_t)val != *(int32_t *)dest )
> +            if ( (int32_t)val != *(int32_t *)dest )

... this condition can never be false. The cast really wants to be
to int64_t, and the overflow you saw being reported is quite likely
for a different reason. But from the sole message you did quote
it's not really possible to figure what else is wrong.

Jan


Reply via email to