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

2017-09-27 Thread Petr Mladek
On Tue 2017-09-26 15:01:52, Joe Lawrence wrote: > On 09/26/2017 10:49 AM, Petr Mladek wrote: > > On Thu 2017-08-31 10:53:51, Joe Lawrence wrote: > >> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > >> index b9628e43c78f..aca62c4b8616 100644 > >> --- a/kernel/livepatch/core.c > >>

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

2017-09-27 Thread Petr Mladek
On Tue 2017-09-26 15:01:52, Joe Lawrence wrote: > On 09/26/2017 10:49 AM, Petr Mladek wrote: > > On Thu 2017-08-31 10:53:51, Joe Lawrence wrote: > >> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > >> index b9628e43c78f..aca62c4b8616 100644 > >> --- a/kernel/livepatch/core.c > >>

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

2017-09-26 Thread Joe Lawrence
On 09/26/2017 10:49 AM, Petr Mladek wrote: > On Thu 2017-08-31 10:53:51, Joe Lawrence wrote: >> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c >> index b9628e43c78f..aca62c4b8616 100644 >> --- a/kernel/livepatch/core.c >> +++ b/kernel/livepatch/core.c >> @@ -54,11 +54,6 @@ static

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

2017-09-26 Thread Joe Lawrence
On 09/26/2017 10:49 AM, Petr Mladek wrote: > On Thu 2017-08-31 10:53:51, Joe Lawrence wrote: >> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c >> index b9628e43c78f..aca62c4b8616 100644 >> --- a/kernel/livepatch/core.c >> +++ b/kernel/livepatch/core.c >> @@ -54,11 +54,6 @@ static

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

2017-09-26 Thread Petr Mladek
On Thu 2017-08-31 10:53:51, Joe Lawrence wrote: > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index b9628e43c78f..aca62c4b8616 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -54,11 +54,6 @@ static bool klp_is_module(struct klp_object *obj) >

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

2017-09-26 Thread Petr Mladek
On Thu 2017-08-31 10:53:51, Joe Lawrence wrote: > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index b9628e43c78f..aca62c4b8616 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -54,11 +54,6 @@ static bool klp_is_module(struct klp_object *obj) >

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

2017-09-13 Thread Joe Lawrence
On 09/13/2017 03:29 AM, Miroslav Benes wrote: > On Tue, 12 Sep 2017, Josh Poimboeuf wrote: > >> On Tue, Sep 12, 2017 at 06:05:44PM -0400, Joe Lawrence wrote: >>> On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: >>> I've re-read this a few times, and I think I might have been

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

2017-09-13 Thread Joe Lawrence
On 09/13/2017 03:29 AM, Miroslav Benes wrote: > On Tue, 12 Sep 2017, Josh Poimboeuf wrote: > >> On Tue, Sep 12, 2017 at 06:05:44PM -0400, Joe Lawrence wrote: >>> On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: >>> I've re-read this a few times, and I think I might have been

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

2017-09-13 Thread Miroslav Benes
On Tue, 12 Sep 2017, Josh Poimboeuf wrote: > On Tue, Sep 12, 2017 at 06:05:44PM -0400, Joe Lawrence wrote: > > On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: > > > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > > > >> @@ -871,13 +882,27 @@ int klp_module_coming(struct module *mod)

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

2017-09-13 Thread Miroslav Benes
On Tue, 12 Sep 2017, Josh Poimboeuf wrote: > On Tue, Sep 12, 2017 at 06:05:44PM -0400, Joe Lawrence wrote: > > On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: > > > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > > > >> @@ -871,13 +882,27 @@ int klp_module_coming(struct module *mod)

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

2017-09-13 Thread Miroslav Benes
On Tue, 12 Sep 2017, Joe Lawrence wrote: > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > > >> +a post-unpatch handler and a post-patch with a pre-unpatch handler in > >> +symmetry: the patch handler acquires and configures resources and the > >> +unpatch handler tears down and releases those

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

2017-09-13 Thread Miroslav Benes
On Tue, 12 Sep 2017, Joe Lawrence wrote: > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > > >> +a post-unpatch handler and a post-patch with a pre-unpatch handler in > >> +symmetry: the patch handler acquires and configures resources and the > >> +unpatch handler tears down and releases those

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

2017-09-12 Thread Josh Poimboeuf
On Tue, Sep 12, 2017 at 06:05:44PM -0400, Joe Lawrence wrote: > On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: > > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > > >> @@ -871,13 +882,27 @@ int klp_module_coming(struct module *mod) > > >> pr_notice("applying

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

2017-09-12 Thread Josh Poimboeuf
On Tue, Sep 12, 2017 at 06:05:44PM -0400, Joe Lawrence wrote: > On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: > > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > > >> @@ -871,13 +882,27 @@ int klp_module_coming(struct module *mod) > > >> pr_notice("applying

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

2017-09-12 Thread Joe Lawrence
On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > >> @@ -871,13 +882,27 @@ int klp_module_coming(struct module *mod) > >>pr_notice("applying patch '%s' to loading module > >> '%s'\n", > >>

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

2017-09-12 Thread Joe Lawrence
On Tue, Sep 12, 2017 at 11:48:48AM -0400, Joe Lawrence wrote: > On 09/12/2017 04:53 AM, Miroslav Benes wrote: > >> @@ -871,13 +882,27 @@ int klp_module_coming(struct module *mod) > >>pr_notice("applying patch '%s' to loading module > >> '%s'\n", > >>

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

2017-09-12 Thread Joe Lawrence
On 09/12/2017 04:53 AM, Miroslav Benes wrote: > >> diff --git a/Documentation/livepatch/callbacks.txt >> b/Documentation/livepatch/callbacks.txt >> ... >> +Each callback action is optional, omitting one does not preclude >> +specifying any other. Typical use cases however, pare a pre-patch with

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

2017-09-12 Thread Joe Lawrence
On 09/12/2017 04:53 AM, Miroslav Benes wrote: > >> diff --git a/Documentation/livepatch/callbacks.txt >> b/Documentation/livepatch/callbacks.txt >> ... >> +Each callback action is optional, omitting one does not preclude >> +specifying any other. Typical use cases however, pare a pre-patch with

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

2017-09-12 Thread Miroslav Benes
> diff --git a/Documentation/livepatch/callbacks.txt > b/Documentation/livepatch/callbacks.txt > new file mode 100644 > index ..689b3f399696 > --- /dev/null > +++ b/Documentation/livepatch/callbacks.txt > @@ -0,0 +1,594 @@ > +== > +(Un)patching Callbacks >

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

2017-09-12 Thread Miroslav Benes
> diff --git a/Documentation/livepatch/callbacks.txt > b/Documentation/livepatch/callbacks.txt > new file mode 100644 > index ..689b3f399696 > --- /dev/null > +++ b/Documentation/livepatch/callbacks.txt > @@ -0,0 +1,594 @@ > +== > +(Un)patching Callbacks >

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

2017-08-31 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 v5 1/3] livepatch: add (un)patch callbacks

2017-08-31 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