Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-22 Thread Torsten Duwe
On Mon, Oct 22, 2018 at 02:53:10PM +0200, Miroslav Benes wrote: > On Sat, 20 Oct 2018, Ard Biesheuvel wrote: > > So I suppose this could get interesting in cases where modules are far > > away from the kernel (i.e., more than -/+ 128 MB). Fortunately, the > > modules themselves are always placed in

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-22 Thread Miroslav Benes
On Sat, 20 Oct 2018, Ard Biesheuvel wrote: > On 19 October 2018 at 23:21, Miroslav Benes wrote: > > > >> >> Ad relocations. I checked that everything in struct mod_arch_specific > >> >> stays after the module is load. Both core and init get SHF_ALLOC set > >> >> (mod->arch.core.plt->sh_flags in m

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-20 Thread Ard Biesheuvel
On 19 October 2018 at 23:21, Miroslav Benes wrote: > >> >> Ad relocations. I checked that everything in struct mod_arch_specific >> >> stays after the module is load. Both core and init get SHF_ALLOC set >> >> (mod->arch.core.plt->sh_flags in module_frob_arch_sections(). It is >> >> important beca

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Miroslav Benes
> >> Ad relocations. I checked that everything in struct mod_arch_specific > >> stays after the module is load. Both core and init get SHF_ALLOC set > >> (mod->arch.core.plt->sh_flags in module_frob_arch_sections(). It is > >> important because apply_relocate_add() may use those sections > >> thr

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Miroslav Benes
> >If I am not mistaken, we do not care for arch.init.plt in livepatch. Is > >that correct? > > I do not believe patching of __init functions is supported (right?) So > we do not need to keep arch.init.plt alive post-module-load. I think we can do that. Theoretically. I'm not sure if it is actu

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Ard Biesheuvel
On 18 October 2018 at 20:58, Jessica Yu wrote: > +++ Miroslav Benes [17/10/18 15:39 +0200]: > >> On Mon, 1 Oct 2018, Torsten Duwe wrote: >> >>> Based on ftrace with regs, do the usual thing. Also allocate a >>> task flag for whatever consistency handling will be used. >>> Watch out for interaction

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Torsten Duwe
On Fri, Oct 19, 2018 at 01:59:01PM +0200, Miroslav Benes wrote: > > Torsten, could you include the outcome to your patch set once we settle on > it? Thanks. Absolutely! Whether as patch 4/4 or on its own and I refer to it -- we'll figure it out. Torsten

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Jessica Yu
+++ Miroslav Benes [19/10/18 13:59 +0200]: On Thu, 18 Oct 2018, Jessica Yu wrote: +++ Miroslav Benes [17/10/18 15:39 +0200]: >On Mon, 1 Oct 2018, Torsten Duwe wrote: > >Ad relocations. I checked that everything in struct mod_arch_specific >stays after the module is load. Both core and init get

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Miroslav Benes
On Thu, 18 Oct 2018, Jessica Yu wrote: > +++ Miroslav Benes [17/10/18 15:39 +0200]: > >On Mon, 1 Oct 2018, Torsten Duwe wrote: > > > >Ad relocations. I checked that everything in struct mod_arch_specific > >stays after the module is load. Both core and init get SHF_ALLOC set > >(mod->arch.core.plt

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-18 Thread Jessica Yu
+++ Miroslav Benes [17/10/18 15:39 +0200]: On Mon, 1 Oct 2018, Torsten Duwe wrote: Based on ftrace with regs, do the usual thing. Also allocate a task flag for whatever consistency handling will be used. Watch out for interactions with the graph tracer. Similar to what Mark wrote about 2/4, I

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-17 Thread Miroslav Benes
On Mon, 1 Oct 2018, Torsten Duwe wrote: > Based on ftrace with regs, do the usual thing. Also allocate a > task flag for whatever consistency handling will be used. > Watch out for interactions with the graph tracer. Similar to what Mark wrote about 2/4, I'd appreciate a better commit log. Could

[PATCH v3 3/4] arm64: implement live patching

2018-10-01 Thread Torsten Duwe
Based on ftrace with regs, do the usual thing. Also allocate a task flag for whatever consistency handling will be used. Watch out for interactions with the graph tracer. Signed-off-by: Torsten Duwe --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -119,6 +119,7 @@ config ARM64 select