Re: [Xen-devel] [PATCH v4 10/11] livepatch/arm[32, 64]: Modify .livepatch.funcs section to be RW when patching

2017-09-21 Thread Jan Beulich
>>> On 21.09.17 at 16:58, wrote: > Do you foresee potentially issue of temporarily modifying permissions of > a mapping? It's generally not a good idea imo, but perhaps it's fine here. I assume the page permissions can't be adversely affected despite their hard coding in the function invocations

Re: [Xen-devel] [PATCH v4 10/11] livepatch/arm[32, 64]: Modify .livepatch.funcs section to be RW when patching

2017-09-21 Thread Julien Grall
Hi Jan, On 21/09/17 13:16, Jan Beulich wrote: On 21.09.17 at 00:31, wrote: @@ -43,7 +46,29 @@ int arch_livepatch_quiesce(void) return -ENOMEM; } -return 0; +if ( nfuncs ) +{ +unsigned long va = (unsigned long)func; +unsigned int offs = va & (PAGE

Re: [Xen-devel] [PATCH v4 10/11] livepatch/arm[32, 64]: Modify .livepatch.funcs section to be RW when patching

2017-09-21 Thread Jan Beulich
>>> On 21.09.17 at 00:31, wrote: > @@ -43,7 +46,29 @@ int arch_livepatch_quiesce(void) > return -ENOMEM; > } > > -return 0; > +if ( nfuncs ) > +{ > +unsigned long va = (unsigned long)func; > +unsigned int offs = va & (PAGE_SIZE - 1); > +unsigned

[Xen-devel] [PATCH v4 10/11] livepatch/arm[32, 64]: Modify .livepatch.funcs section to be RW when patching

2017-09-20 Thread Konrad Rzeszutek Wilk
This was found when porting livepatch-build-tools to ARM64/32 When livepatch-build-tools are built (and test-case thanks to: livepatch/tests: Make sure all .livepatch.funcs sections are read-only) the .livepatch.funcs are in read-only section. However the hypervisor uses the 'opaque' for its own