Re: [Xen-devel] [PATCH v4 05/16] livepatch: ARM/x86: Check displacement of old_addr and new_addr

2016-09-19 Thread Julien Grall
Hello Konrad, On 16/09/2016 18:38, Konrad Rzeszutek Wilk wrote: If the distance is too great we are in trouble - as our relocation distance can surely be clipped, or still have a valid width - but cause an overflow of distance. On various architectures the maximum displacement for a uncondition

Re: [Xen-devel] [PATCH v4 05/16] livepatch: ARM/x86: Check displacement of old_addr and new_addr

2016-09-19 Thread Jan Beulich
>>> On 16.09.16 at 18:38, wrote: > If the distance is too great we are in trouble - as our relocation s/great/big/ (or large), as mentioned before? > @@ -68,7 +69,7 @@ int arch_livepatch_secure(const void *va, unsigned int > pages, enum va_type types > void arch_livepatch_init(void); > > #i

[Xen-devel] [PATCH v4 05/16] livepatch: ARM/x86: Check displacement of old_addr and new_addr

2016-09-16 Thread Konrad Rzeszutek Wilk
If the distance is too great we are in trouble - as our relocation distance can surely be clipped, or still have a valid width - but cause an overflow of distance. On various architectures the maximum displacement for a unconditional branch/jump varies. ARM32 is +/- 32MB, ARM64 is +/- 128MB while