Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-03-28 Thread Steven Rostedt
On Tue, 16 Feb 2016 00:42:25 +0100 (CET) Jiri Kosina wrote: > Steven, I'd appreciate if you could tell me whether your Ack to > "ftrace/module: remove ftrace module notifier" still holds even if > module.c changes are not happening. When threads get this busy, and I'm busy on other things, I

[PATCH v3 2/2] livepatch/module: remove livepatch module notifier

2016-03-19 Thread Jessica Yu
Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_coming() during module load, and that klp_module_going() is run before ftrace_release

Re: livepatch/module: remove livepatch module notifier

2016-03-15 Thread Petr Mladek
On Mon 2016-03-14 13:50:09, Jessica Yu wrote: > +++ Petr Mladek [14/03/16 16:06 +0100]: > >On Fri 2016-03-11 15:03:48, Jessica Yu wrote: > >>+err: > >>+ /* > >>+* If a patch is unsuccessfully applied, return > >>+* error to the module loader. > >>+*/ > >>+ pr_warn("patch '%s' failed

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-03-14 Thread Josh Poimboeuf
On Fri, Mar 11, 2016 at 03:03:48PM -0500, Jessica Yu wrote: > +/* Module can be either COMING or GOING */ IMO this comment doesn't really add anything: the below WARN_ON already says as much. Also the location of the comment right above the function is confusing: someone not familiar with the cod

Re: livepatch/module: remove livepatch module notifier

2016-03-14 Thread Jessica Yu
+++ Petr Mladek [14/03/16 16:06 +0100]: On Fri 2016-03-11 15:03:48, Jessica Yu wrote: Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_mod

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-03-14 Thread Petr Mladek
On Fri 2016-03-11 15:03:48, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during module load, an

[PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-03-11 Thread Jessica Yu
Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_coming() during module load, and that klp_module_going() is run before ftrace_release

Re: [PATCH 3/3] livepatch/module: remove livepatch module notifier

2016-03-10 Thread Josh Poimboeuf
On Wed, Mar 09, 2016 at 05:13:57PM -0500, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during m

[PATCH 3/3] livepatch/module: remove livepatch module notifier

2016-03-09 Thread Jessica Yu
Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_coming() during module load, and that klp_module_going() is run before ftrace_release

Re: livepatch/module: remove livepatch module notifier

2016-02-29 Thread Jessica Yu
+++ Rusty Russell [29/02/16 11:00 +1030]: Jiri Kosina writes: On Wed, 10 Feb 2016, Rusty Russell wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_ena

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-29 Thread Rusty Russell
Jiri Kosina writes: > On Wed, 10 Feb 2016, Rusty Russell wrote: > >> > Remove the livepatch module notifier in favor of directly enabling and >> > disabling patches to modules in the module loader. Hard-coding the >> > function calls ensures that ftrace_module_enable() is run before >> > klp_modul

Re: livepatch/module: remove livepatch module notifier

2016-02-16 Thread Jessica Yu
+++ Miroslav Benes [16/02/16 09:41 +0100]: On Mon, 15 Feb 2016, Jessica Yu wrote: +++ Jiri Kosina [16/02/16 00:42 +0100]: > On Mon, 15 Feb 2016, Josh Poimboeuf wrote: > > > So I think the commit causing the regression is 5156dca34a3e, which > > occurred in the 4.5 cycle, *not* in 4.4. > > Agree

Re: livepatch/module: remove livepatch module notifier

2016-02-16 Thread Miroslav Benes
On Mon, 15 Feb 2016, Jessica Yu wrote: > +++ Jiri Kosina [16/02/16 00:42 +0100]: > > On Mon, 15 Feb 2016, Josh Poimboeuf wrote: > > > > > So I think the commit causing the regression is 5156dca34a3e, which > > > occurred in the 4.5 cycle, *not* in 4.4. > > > > Agreed, by "4.4 regresion" I mean "

Re: livepatch/module: remove livepatch module notifier

2016-02-15 Thread Jessica Yu
+++ Jiri Kosina [16/02/16 00:42 +0100]: On Mon, 15 Feb 2016, Josh Poimboeuf wrote: So I think the commit causing the regression is 5156dca34a3e, which occurred in the 4.5 cycle, *not* in 4.4. Agreed, by "4.4 regresion" I mean "regression compared to 4.4"; i.e. regression that will become real

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-15 Thread Jiri Kosina
On Mon, 15 Feb 2016, Josh Poimboeuf wrote: > So I think the commit causing the regression is 5156dca34a3e, which > occurred in the 4.5 cycle, *not* in 4.4. Agreed, by "4.4 regresion" I mean "regression compared to 4.4"; i.e. regression that will become real issue once 4.5 is released. > Also it

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-15 Thread Josh Poimboeuf
On Sun, Feb 14, 2016 at 11:59:00PM +0100, Jiri Kosina wrote: > On Wed, 10 Feb 2016, Jiri Kosina wrote: > > > > > Remove the livepatch module notifier in favor of directly enabling and > > > > disabling patches to modules in the module loader. Hard-coding the > > > > function calls ensures that ftr

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-14 Thread Jiri Kosina
On Wed, 10 Feb 2016, Jiri Kosina wrote: > > > Remove the livepatch module notifier in favor of directly enabling and > > > disabling patches to modules in the module loader. Hard-coding the > > > function calls ensures that ftrace_module_enable() is run before > > > klp_module_coming() during modu

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-10 Thread Miroslav Benes
On Mon, 8 Feb 2016, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during module load, and that

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-10 Thread Jiri Kosina
On Wed, 10 Feb 2016, Rusty Russell wrote: > > Remove the livepatch module notifier in favor of directly enabling and > > disabling patches to modules in the module loader. Hard-coding the > > function calls ensures that ftrace_module_enable() is run before > > klp_module_coming() during module loa

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-09 Thread Rusty Russell
Jessica Yu writes: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during module load, and that klp_module_going()

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-09 Thread Josh Poimboeuf
On Mon, Feb 08, 2016 at 11:50:24PM -0500, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during m

[PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-08 Thread Jessica Yu
Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_coming() during module load, and that klp_module_going() is run before ftrace_release

Re: [PATCH v3 2/2] livepatch/module: remove livepatch module notifier

2016-02-08 Thread Petr Mladek
On Fri 2016-02-05 22:08:17, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during module load, an

Re: livepatch/module: remove livepatch module notifier

2016-02-07 Thread Rusty Russell
Jessica Yu writes: > +++ Petr Mladek [04/02/16 15:39 +0100]: >>On Mon 2016-02-01 20:17:36, Jessica Yu wrote: > [ snipped since email is getting long ] >>> diff --git a/kernel/module.c b/kernel/module.c >>> index b05d466..71c77ed 100644 >>> --- a/kernel/module.c >>> +++ b/kernel/module.c >>> @@ -53

[PATCH v3 2/2] livepatch/module: remove livepatch module notifier

2016-02-05 Thread Jessica Yu
Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_coming() during module load, and that klp_module_going() is run before ftrace_release

Re: livepatch/module: remove livepatch module notifier

2016-02-05 Thread Petr Mladek
On Fri 2016-02-05 10:15:56, Miroslav Benes wrote: > On Thu, 4 Feb 2016, Jessica Yu wrote: > > Argh, thank you for catching that. I think we could split up > > complete_formation() > > into two functions in order to make the error handling work. > > > > Does all this look ok? > > Hm, there is an

Re: livepatch/module: remove livepatch module notifier

2016-02-05 Thread Miroslav Benes
On Thu, 4 Feb 2016, Jessica Yu wrote: > +++ Petr Mladek [04/02/16 15:39 +0100]: > > On Mon 2016-02-01 20:17:36, Jessica Yu wrote: > [ snipped since email is getting long ] > > > diff --git a/kernel/module.c b/kernel/module.c > > > index b05d466..71c77ed 100644 > > > --- a/kernel/module.c > > > +++

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-05 Thread Miroslav Benes
On Thu, 4 Feb 2016, Josh Poimboeuf wrote: > On Mon, Feb 01, 2016 at 08:17:36PM -0500, Jessica Yu wrote: > > Remove the livepatch module notifier in favor of directly enabling and > > disabling patches to modules in the module loader. Hard-coding the > > function calls ensures that ftrace_module_en

Re: livepatch/module: remove livepatch module notifier

2016-02-04 Thread Jessica Yu
+++ Petr Mladek [04/02/16 15:39 +0100]: On Mon 2016-02-01 20:17:36, Jessica Yu wrote: [ snipped since email is getting long ] diff --git a/kernel/module.c b/kernel/module.c index b05d466..71c77ed 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -53,6 +53,7 @@ #include #include #includ

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-04 Thread Josh Poimboeuf
On Mon, Feb 01, 2016 at 08:17:36PM -0500, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_enable() during m

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-04 Thread Miroslav Benes
On Mon, 1 Feb 2016, Jessica Yu wrote: > +/* Called from the module loader during module coming/going states */ > +extern int klp_module_enable(struct module *mod); > +extern void klp_module_disable(struct module *mod); We do not use 'extern' keyword in header files. It is redundant. Unfortunatel

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-04 Thread Miroslav Benes
On Thu, 4 Feb 2016, Petr Mladek wrote: > On Mon 2016-02-01 20:17:36, Jessica Yu wrote: > > > > > > - if (patch->state == KLP_DISABLED) > > - goto disabled; > > + ret = klp_init_object_loaded(patch, obj); > > + if (ret) { > > +

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-04 Thread Steven Rostedt
On Thu, 4 Feb 2016 15:39:35 +0100 Petr Mladek wrote: > > @@ -3375,6 +3378,10 @@ static int complete_formation(struct module *mod, > > struct load_info *info) > > mutex_unlock(&module_mutex); > > > > ftrace_module_enable(mod); > > + err = klp_module_enable(mod); > > + if (err) > >

Re: [PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-04 Thread Petr Mladek
On Mon 2016-02-01 20:17:36, Jessica Yu wrote: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_enable() during module load, an

[PATCH v2 2/2] livepatch/module: remove livepatch module notifier

2016-02-01 Thread Jessica Yu
Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_enable() during module load, and that klp_module_disable() is run before ftrace_relea