Re: [Xen-devel] [PATCH v4 04/16] livepatch: Initial ARM64 support.

2016-09-20 Thread Julien Grall
Hi Konrad, On 19/09/2016 16:33, Konrad Rzeszutek Wilk wrote: void arch_livepatch_revive(void) { +/* + * Nuke the instruction cache. Data cache has been cleaned before in + * arch_livepatch_apply_jmp. I think you forgot to clean text region from the payload. Without that, you

Re: [Xen-devel] [PATCH v4 04/16] livepatch: Initial ARM64 support.

2016-09-19 Thread Konrad Rzeszutek Wilk
> > > void arch_livepatch_revive(void) > > { > > +/* > > + * Nuke the instruction cache. Data cache has been cleaned before in > > + * arch_livepatch_apply_jmp. > > I think you forgot to clean text region from the payload. Without that, you > may receive a crash if you have a

Re: [Xen-devel] [PATCH v4 04/16] livepatch: Initial ARM64 support.

2016-09-19 Thread Julien Grall
Hi Konrad, On 16/09/2016 18:38, Konrad Rzeszutek Wilk wrote: diff --git a/xen/arch/arm/arm64/livepatch.c b/xen/arch/arm/arm64/livepatch.c new file mode 100644 index 000..49eb69b --- /dev/null +++ b/xen/arch/arm/arm64/livepatch.c [...] +int arch_livepatch_perform_rela(struct

[Xen-devel] [PATCH v4 04/16] livepatch: Initial ARM64 support.

2016-09-16 Thread Konrad Rzeszutek Wilk
As compared to x86 the va of the hypervisor .text is locked down - we cannot modify the running pagetables to have the .ro flag unset. We borrow the same idea that alternative patching has - which is to vmap the entire .text region and use the alternative virtual address for patching. Since we