Re: [PATCH 2/2] kernel: add support for live patching

2014-12-01 Thread Seth Jennings
On Sun, Nov 30, 2014 at 01:23:48PM +0100, Pavel Machek wrote: > On Thu 2014-11-06 16:51:02, Jiri Slaby wrote: > > On 11/06/2014, 03:39 PM, Seth Jennings wrote: > > > This commit introduces code for the live patching core. It implements > > > an ftrace-based mechanism and kernel interface for

Re: [PATCH 2/2] kernel: add support for live patching

2014-12-01 Thread Seth Jennings
On Sun, Nov 30, 2014 at 01:23:48PM +0100, Pavel Machek wrote: On Thu 2014-11-06 16:51:02, Jiri Slaby wrote: On 11/06/2014, 03:39 PM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-30 Thread Pavel Machek
On Thu 2014-11-06 16:51:02, Jiri Slaby wrote: > On 11/06/2014, 03:39 PM, Seth Jennings wrote: > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module functions. > > Hi, >

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-30 Thread Pavel Machek
On Thu 2014-11-06 16:51:02, Jiri Slaby wrote: On 11/06/2014, 03:39 PM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. Hi, nice! So

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-14 Thread Petr Mladek
On Fri 2014-11-14 14:30:30, Miroslav Benes wrote: > On Thu, 13 Nov 2014, Seth Jennings wrote: > > > On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: > > > > > > Hi, > > > > > > thank you for the first version of the united live patching core. > > > > > > The patch below

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-14 Thread Miroslav Benes
On Thu, 13 Nov 2014, Seth Jennings wrote: > On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: > > > > Hi, > > > > thank you for the first version of the united live patching core. > > > > The patch below implements some of our review objections. Changes are > > described in the

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-14 Thread Miroslav Benes
On Thu, 13 Nov 2014, Seth Jennings wrote: On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: Hi, thank you for the first version of the united live patching core. The patch below implements some of our review objections. Changes are described in the commit log. It

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-14 Thread Petr Mladek
On Fri 2014-11-14 14:30:30, Miroslav Benes wrote: On Thu, 13 Nov 2014, Seth Jennings wrote: On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: Hi, thank you for the first version of the united live patching core. The patch below implements some of our review

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-13 Thread Seth Jennings
On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: > > Hi, > > thank you for the first version of the united live patching core. > > The patch below implements some of our review objections. Changes are > described in the commit log. It simplifies the hierarchy of data >

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-13 Thread Josh Poimboeuf
On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: > > Hi, > > thank you for the first version of the united live patching core. > > The patch below implements some of our review objections. Changes are > described in the commit log. It simplifies the hierarchy of data >

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-13 Thread Miroslav Benes
Hi, thank you for the first version of the united live patching core. The patch below implements some of our review objections. Changes are described in the commit log. It simplifies the hierarchy of data structures, removes data duplication (lp_ and lpc_ structures) and simplifies sysfs

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-13 Thread Miroslav Benes
Hi, thank you for the first version of the united live patching core. The patch below implements some of our review objections. Changes are described in the commit log. It simplifies the hierarchy of data structures, removes data duplication (lp_ and lpc_ structures) and simplifies sysfs

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-13 Thread Josh Poimboeuf
On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: Hi, thank you for the first version of the united live patching core. The patch below implements some of our review objections. Changes are described in the commit log. It simplifies the hierarchy of data structures,

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-13 Thread Seth Jennings
On Thu, Nov 13, 2014 at 11:16:00AM +0100, Miroslav Benes wrote: Hi, thank you for the first version of the united live patching core. The patch below implements some of our review objections. Changes are described in the commit log. It simplifies the hierarchy of data structures,

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-11 Thread Seth Jennings
On Tue, Nov 11, 2014 at 11:17:39PM +0100, Jiri Kosina wrote: > On Tue, 11 Nov 2014, Seth Jennings wrote: > > > It will be in v2 (hopefully out in the next couple of days). > > FWIW we are also working on a few patches on top of v1 to back some of the > proposals we've made during the first

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-11 Thread Jiri Kosina
On Tue, 11 Nov 2014, Seth Jennings wrote: > It will be in v2 (hopefully out in the next couple of days). FWIW we are also working on a few patches on top of v1 to back some of the proposals we've made during the first round of review, so maybe it might make sense to wait with v2 a little bit

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-11 Thread Seth Jennings
On Fri, Nov 07, 2014 at 07:40:11PM +0100, Petr Mladek wrote: > On Fri 2014-11-07 12:07:11, Seth Jennings wrote: > > On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: > > > On Thu 2014-11-06 08:39:08, Seth Jennings wrote: [...] > > > > + up(_mutex); > > > > + WARN("failed to

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-11 Thread Seth Jennings
On Fri, Nov 07, 2014 at 07:40:11PM +0100, Petr Mladek wrote: On Fri 2014-11-07 12:07:11, Seth Jennings wrote: On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: On Thu 2014-11-06 08:39:08, Seth Jennings wrote: [...] + up(lpc_mutex); + WARN(failed to apply patch

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-11 Thread Jiri Kosina
On Tue, 11 Nov 2014, Seth Jennings wrote: It will be in v2 (hopefully out in the next couple of days). FWIW we are also working on a few patches on top of v1 to back some of the proposals we've made during the first round of review, so maybe it might make sense to wait with v2 a little bit

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-11 Thread Seth Jennings
On Tue, Nov 11, 2014 at 11:17:39PM +0100, Jiri Kosina wrote: On Tue, 11 Nov 2014, Seth Jennings wrote: It will be in v2 (hopefully out in the next couple of days). FWIW we are also working on a few patches on top of v1 to back some of the proposals we've made during the first round of

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-10 Thread Josh Poimboeuf
On Mon, Nov 10, 2014 at 11:08:00AM +0100, Jiri Kosina wrote: > On Thu, 6 Nov 2014, Seth Jennings wrote: > > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > new file mode 100644 > > index 000..b32dbb5 > > --- /dev/null > > +++ b/kernel/livepatch/core.c > > [ ... snip ...

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-10 Thread Jiri Kosina
On Thu, 6 Nov 2014, Seth Jennings wrote: > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > new file mode 100644 > index 000..b32dbb5 > --- /dev/null > +++ b/kernel/livepatch/core.c [ ... snip ... ] > +/ > + * dynamic relocations

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-10 Thread Jiri Kosina
On Thu, 6 Nov 2014, Seth Jennings wrote: diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c new file mode 100644 index 000..b32dbb5 --- /dev/null +++ b/kernel/livepatch/core.c [ ... snip ... ] +/ + * dynamic relocations (load-time

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-10 Thread Josh Poimboeuf
On Mon, Nov 10, 2014 at 11:08:00AM +0100, Jiri Kosina wrote: On Thu, 6 Nov 2014, Seth Jennings wrote: diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c new file mode 100644 index 000..b32dbb5 --- /dev/null +++ b/kernel/livepatch/core.c [ ... snip ... ]

Re: more patches for the same func: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Fri, Nov 07, 2014 at 06:39:03PM +0100, Petr Mladek wrote: > On Thu 2014-11-06 08:39:08, Seth Jennings wrote: > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Fri, Nov 07, 2014 at 07:21:03PM +0100, Petr Mladek wrote: > On Thu 2014-11-06 10:57:48, Seth Jennings wrote: > > On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: > > > On 11/06/2014, 03:39 PM, Seth Jennings wrote: > > > > +/* > > > > + * Core

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 11:40:38AM -0800, Andy Lutomirski wrote: > On 11/06/2014 06:39 AM, Seth Jennings wrote: > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 11:40:38AM -0800, Andy Lutomirski wrote: > On 11/06/2014 06:39 AM, Seth Jennings wrote: > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Andy Lutomirski
On 11/06/2014 06:39 AM, Seth Jennings wrote: > This commit introduces code for the live patching core. It implements > an ftrace-based mechanism and kernel interface for doing live patching > of kernel and kernel module functions. > > It represents the greatest common functionality set between

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 07:40:11PM +0100, Petr Mladek wrote: > On Fri 2014-11-07 12:07:11, Seth Jennings wrote: > > On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: > > > On Thu 2014-11-06 08:39:08, Seth Jennings wrote: > > > > This commit introduces code for the live patching core.

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Fri 2014-11-07 12:07:11, Seth Jennings wrote: > On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: > > On Thu 2014-11-06 08:39:08, Seth Jennings wrote: > > > This commit introduces code for the live patching core. It implements > > > an ftrace-based mechanism and kernel interface for

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Thu 2014-11-06 10:57:48, Seth Jennings wrote: > On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: > > On 11/06/2014, 03:39 PM, Seth Jennings wrote: > > > +/* > > > + * Core structures > > > + / > > > + > > > +/* >

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: > On Thu 2014-11-06 08:39:08, Seth Jennings wrote: > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module

more patches for the same func: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Thu 2014-11-06 08:39:08, Seth Jennings wrote: > This commit introduces code for the live patching core. It implements > an ftrace-based mechanism and kernel interface for doing live patching > of kernel and kernel module functions. > > It represents the greatest common functionality set

module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Thu 2014-11-06 08:39:08, Seth Jennings wrote: > This commit introduces code for the live patching core. It implements > an ftrace-based mechanism and kernel interface for doing live patching > of kernel and kernel module functions. > > It represents the greatest common functionality set

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 02:13:37PM +0100, Jiri Kosina wrote: > On Fri, 7 Nov 2014, Josh Poimboeuf wrote: > > > > Also, lpc_create_object(), lpc_create_func(), lpc_create_patch(), > > > lpc_create_objects(), lpc_create_funcs(), ... they all are pretty much > > > alike, and are asking for some

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Fri, Nov 07, 2014 at 02:13:37PM +0100, Jiri Kosina wrote: > On Fri, 7 Nov 2014, Josh Poimboeuf wrote: > > > > Also, lpc_create_object(), lpc_create_func(), lpc_create_patch(), > > > lpc_create_objects(), lpc_create_funcs(), ... they all are pretty much > > > alike, and are asking for some

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Jiri Kosina
On Fri, 7 Nov 2014, Josh Poimboeuf wrote: > > Also, lpc_create_object(), lpc_create_func(), lpc_create_patch(), > > lpc_create_objects(), lpc_create_funcs(), ... they all are pretty much > > alike, and are asking for some kind of unification ... perhaps iterator > > for generic structure

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Thu, Nov 06, 2014 at 11:20:48PM +0100, Jiri Kosina wrote: > On Thu, 6 Nov 2014, Seth Jennings wrote: > > > > Thanks a lot for having started the work on this! > > > > > > We will be reviewing it carefully in the coming days and will getting > > > back > > > to you (I was surprised to see

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Thu, Nov 06, 2014 at 11:20:48PM +0100, Jiri Kosina wrote: On Thu, 6 Nov 2014, Seth Jennings wrote: Thanks a lot for having started the work on this! We will be reviewing it carefully in the coming days and will getting back to you (I was surprised to see that that diffstat

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Jiri Kosina
On Fri, 7 Nov 2014, Josh Poimboeuf wrote: Also, lpc_create_object(), lpc_create_func(), lpc_create_patch(), lpc_create_objects(), lpc_create_funcs(), ... they all are pretty much alike, and are asking for some kind of unification ... perhaps iterator for generic structure

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Fri, Nov 07, 2014 at 02:13:37PM +0100, Jiri Kosina wrote: On Fri, 7 Nov 2014, Josh Poimboeuf wrote: Also, lpc_create_object(), lpc_create_func(), lpc_create_patch(), lpc_create_objects(), lpc_create_funcs(), ... they all are pretty much alike, and are asking for some kind of

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 02:13:37PM +0100, Jiri Kosina wrote: On Fri, 7 Nov 2014, Josh Poimboeuf wrote: Also, lpc_create_object(), lpc_create_func(), lpc_create_patch(), lpc_create_objects(), lpc_create_funcs(), ... they all are pretty much alike, and are asking for some kind of

module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Thu 2014-11-06 08:39:08, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between

more patches for the same func: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Thu 2014-11-06 08:39:08, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: On Thu 2014-11-06 08:39:08, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions.

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Thu 2014-11-06 10:57:48, Seth Jennings wrote: On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: On 11/06/2014, 03:39 PM, Seth Jennings wrote: +/* + * Core structures + / + +/* + * lp_ structs

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Petr Mladek
On Fri 2014-11-07 12:07:11, Seth Jennings wrote: On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: On Thu 2014-11-06 08:39:08, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing

Re: module notifier: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 07:40:11PM +0100, Petr Mladek wrote: On Fri 2014-11-07 12:07:11, Seth Jennings wrote: On Fri, Nov 07, 2014 at 06:13:07PM +0100, Petr Mladek wrote: On Thu 2014-11-06 08:39:08, Seth Jennings wrote: This commit introduces code for the live patching core. It

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Andy Lutomirski
On 11/06/2014 06:39 AM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between kpatch

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 11:40:38AM -0800, Andy Lutomirski wrote: On 11/06/2014 06:39 AM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions.

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Seth Jennings
On Fri, Nov 07, 2014 at 11:40:38AM -0800, Andy Lutomirski wrote: On 11/06/2014 06:39 AM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions.

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Fri, Nov 07, 2014 at 07:21:03PM +0100, Petr Mladek wrote: On Thu 2014-11-06 10:57:48, Seth Jennings wrote: On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: On 11/06/2014, 03:39 PM, Seth Jennings wrote: +/* + * Core structures +

Re: more patches for the same func: was Re: [PATCH 2/2] kernel: add support for live patching

2014-11-07 Thread Josh Poimboeuf
On Fri, Nov 07, 2014 at 06:39:03PM +0100, Petr Mladek wrote: On Thu 2014-11-06 08:39:08, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions.

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Jiri Kosina
On Thu, 6 Nov 2014, Seth Jennings wrote: > > Thanks a lot for having started the work on this! > > > > We will be reviewing it carefully in the coming days and will getting back > > to you (I was surprised to see that that diffstat indicates that it's > > actually more code than our whole

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
On Thu, Nov 06, 2014 at 03:02:04PM -0500, Steven Rostedt wrote: > On Thu, 6 Nov 2014 08:39:08 -0600 > Seth Jennings wrote: > > > --- /dev/null > > +++ b/kernel/livepatch/Kconfig > > @@ -0,0 +1,11 @@ > > +config LIVE_PATCHING > > + tristate "Live Kernel Patching" > > + depends on

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Steven Rostedt
On Thu, 6 Nov 2014 08:39:08 -0600 Seth Jennings wrote: > --- /dev/null > +++ b/kernel/livepatch/Kconfig > @@ -0,0 +1,11 @@ > +config LIVE_PATCHING > + tristate "Live Kernel Patching" > + depends on DYNAMIC_FTRACE_WITH_REGS && MODULES && SYSFS && KALLSYMS_ALL > + default m Nuke this

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Vojtech Pavlik
On Thu, Nov 06, 2014 at 10:20:49AM -0600, Seth Jennings wrote: > Yes, I should explain it. > > This is something that is currently only used in the kpatch approach. > It allows the patching core to do dynamic relocations on the new > function code, similar to what the kernel module linker does,

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Josh Poimboeuf
On Thu, Nov 06, 2014 at 10:57:48AM -0600, Seth Jennings wrote: > On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: > > On 11/06/2014, 03:39 PM, Seth Jennings wrote: > > > +/* must be called with lpc_mutex held */ > > > +static int lpc_enable_patch(struct lpc_patch *patch) > > > > The

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: > On 11/06/2014, 03:39 PM, Seth Jennings wrote: > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Josh Poimboeuf
On Thu, Nov 06, 2014 at 10:20:49AM -0600, Seth Jennings wrote: > On Thu, Nov 06, 2014 at 04:11:37PM +0100, Jiri Kosina wrote: > > On Thu, 6 Nov 2014, Seth Jennings wrote: > > > +/ > > > + * dynamic relocations (load-time linker) > > > +

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
On Thu, Nov 06, 2014 at 04:11:37PM +0100, Jiri Kosina wrote: > On Thu, 6 Nov 2014, Seth Jennings wrote: > > > This commit introduces code for the live patching core. It implements > > an ftrace-based mechanism and kernel interface for doing live patching > > of kernel and kernel module

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Jiri Slaby
On 11/06/2014, 03:39 PM, Seth Jennings wrote: > This commit introduces code for the live patching core. It implements > an ftrace-based mechanism and kernel interface for doing live patching > of kernel and kernel module functions. Hi, nice! So we have something to start with. Brilliant! I

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Jiri Kosina
On Thu, 6 Nov 2014, Seth Jennings wrote: > This commit introduces code for the live patching core. It implements > an ftrace-based mechanism and kernel interface for doing live patching > of kernel and kernel module functions. > > It represents the greatest common functionality set between

[PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between kpatch and kgraft and can accept patches built using

[PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between kpatch and kgraft and can accept patches built using

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Jiri Kosina
On Thu, 6 Nov 2014, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. It represents the greatest common functionality set between kpatch

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Jiri Slaby
On 11/06/2014, 03:39 PM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions. Hi, nice! So we have something to start with. Brilliant! I have

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
On Thu, Nov 06, 2014 at 04:11:37PM +0100, Jiri Kosina wrote: On Thu, 6 Nov 2014, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions.

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Josh Poimboeuf
On Thu, Nov 06, 2014 at 10:20:49AM -0600, Seth Jennings wrote: On Thu, Nov 06, 2014 at 04:11:37PM +0100, Jiri Kosina wrote: On Thu, 6 Nov 2014, Seth Jennings wrote: +/ + * dynamic relocations (load-time linker) +

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: On 11/06/2014, 03:39 PM, Seth Jennings wrote: This commit introduces code for the live patching core. It implements an ftrace-based mechanism and kernel interface for doing live patching of kernel and kernel module functions.

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Josh Poimboeuf
On Thu, Nov 06, 2014 at 10:57:48AM -0600, Seth Jennings wrote: On Thu, Nov 06, 2014 at 04:51:02PM +0100, Jiri Slaby wrote: On 11/06/2014, 03:39 PM, Seth Jennings wrote: +/* must be called with lpc_mutex held */ +static int lpc_enable_patch(struct lpc_patch *patch) The question I want

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Vojtech Pavlik
On Thu, Nov 06, 2014 at 10:20:49AM -0600, Seth Jennings wrote: Yes, I should explain it. This is something that is currently only used in the kpatch approach. It allows the patching core to do dynamic relocations on the new function code, similar to what the kernel module linker does, but

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Steven Rostedt
On Thu, 6 Nov 2014 08:39:08 -0600 Seth Jennings sjenn...@redhat.com wrote: --- /dev/null +++ b/kernel/livepatch/Kconfig @@ -0,0 +1,11 @@ +config LIVE_PATCHING + tristate Live Kernel Patching + depends on DYNAMIC_FTRACE_WITH_REGS MODULES SYSFS KALLSYMS_ALL + default m Nuke

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Seth Jennings
On Thu, Nov 06, 2014 at 03:02:04PM -0500, Steven Rostedt wrote: On Thu, 6 Nov 2014 08:39:08 -0600 Seth Jennings sjenn...@redhat.com wrote: --- /dev/null +++ b/kernel/livepatch/Kconfig @@ -0,0 +1,11 @@ +config LIVE_PATCHING + tristate Live Kernel Patching + depends on

Re: [PATCH 2/2] kernel: add support for live patching

2014-11-06 Thread Jiri Kosina
On Thu, 6 Nov 2014, Seth Jennings wrote: Thanks a lot for having started the work on this! We will be reviewing it carefully in the coming days and will getting back to you (I was surprised to see that that diffstat indicates that it's actually more code than our whole kgraft