Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-30 Thread Josh Poimboeuf
On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > @@ -871,6 +882,13 @@ int klp_module_coming(struct module *mod) > pr_notice("applying patch '%s' to loading module > '%s'\n", > patch->mod->name, obj->mod->name); > > +

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-30 Thread Josh Poimboeuf
On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > @@ -871,6 +882,13 @@ int klp_module_coming(struct module *mod) > pr_notice("applying patch '%s' to loading module > '%s'\n", > patch->mod->name, obj->mod->name); > > +

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-30 Thread Josh Poimboeuf
On Wed, Aug 30, 2017 at 09:27:16AM -0400, Joe Lawrence wrote: > > So instead of 'obj->pre_patch_callback_done', how about > > 'obj->callbacks_enabled'? > > > > It could be set in the following cases: > > > > a) if the object has a pre_patch callback, set obj->callbacks_enabled > > after

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-30 Thread Josh Poimboeuf
On Wed, Aug 30, 2017 at 09:27:16AM -0400, Joe Lawrence wrote: > > So instead of 'obj->pre_patch_callback_done', how about > > 'obj->callbacks_enabled'? > > > > It could be set in the following cases: > > > > a) if the object has a pre_patch callback, set obj->callbacks_enabled > > after

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-30 Thread Joe Lawrence
On Tue, Aug 29, 2017 at 02:59:12PM -0500, Josh Poimboeuf wrote: > On Tue, Aug 29, 2017 at 03:22:06PM -0400, Joe Lawrence wrote: > > On 08/29/2017 11:49 AM, Josh Poimboeuf wrote: > > > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > > >> +Test 6 > > >> +-- > > >> + > > >> +Test

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-30 Thread Joe Lawrence
On Tue, Aug 29, 2017 at 02:59:12PM -0500, Josh Poimboeuf wrote: > On Tue, Aug 29, 2017 at 03:22:06PM -0400, Joe Lawrence wrote: > > On 08/29/2017 11:49 AM, Josh Poimboeuf wrote: > > > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > > >> +Test 6 > > >> +-- > > >> + > > >> +Test

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-29 Thread Josh Poimboeuf
On Tue, Aug 29, 2017 at 03:22:06PM -0400, Joe Lawrence wrote: > On 08/29/2017 11:49 AM, Josh Poimboeuf wrote: > > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > >> +Test 6 > >> +-- > >> + > >> +Test a scenario where a vmlinux pre-patch callback returns a non-zero > >> +status

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-29 Thread Josh Poimboeuf
On Tue, Aug 29, 2017 at 03:22:06PM -0400, Joe Lawrence wrote: > On 08/29/2017 11:49 AM, Josh Poimboeuf wrote: > > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > >> +Test 6 > >> +-- > >> + > >> +Test a scenario where a vmlinux pre-patch callback returns a non-zero > >> +status

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-29 Thread Joe Lawrence
On 08/29/2017 11:49 AM, Josh Poimboeuf wrote: > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: >> +Test 6 >> +-- >> + >> +Test a scenario where a vmlinux pre-patch callback returns a non-zero >> +status (ie, failure): >> + >> +- load target module >> +- load livepatch -ENODEV >>

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-29 Thread Joe Lawrence
On 08/29/2017 11:49 AM, Josh Poimboeuf wrote: > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: >> +Test 6 >> +-- >> + >> +Test a scenario where a vmlinux pre-patch callback returns a non-zero >> +status (ie, failure): >> + >> +- load target module >> +- load livepatch -ENODEV >>

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-29 Thread Josh Poimboeuf
On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > +Test 6 > +-- > + > +Test a scenario where a vmlinux pre-patch callback returns a non-zero > +status (ie, failure): > + > +- load target module > +- load livepatch -ENODEV > +- unload target module > + > +First load a target

Re: [PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-29 Thread Josh Poimboeuf
On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote: > +Test 6 > +-- > + > +Test a scenario where a vmlinux pre-patch callback returns a non-zero > +status (ie, failure): > + > +- load target module > +- load livepatch -ENODEV > +- unload target module > + > +First load a target

[PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-25 Thread Joe Lawrence
Provide livepatch modules a klp_object (un)patching notification mechanism. Pre and post-(un)patch callbacks allow livepatch modules to setup or synchronize changes that would be difficult to support in only patched-or-unpatched code contexts. Callbacks can be registered for target module or

[PATCH v4 1/3] livepatch: add (un)patch callbacks

2017-08-25 Thread Joe Lawrence
Provide livepatch modules a klp_object (un)patching notification mechanism. Pre and post-(un)patch callbacks allow livepatch modules to setup or synchronize changes that would be difficult to support in only patched-or-unpatched code contexts. Callbacks can be registered for target module or