Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-11 Thread Josh Poimboeuf
On Wed, Jan 11, 2017 at 04:18:28PM +0100, Petr Mladek wrote: > On Tue 2017-01-10 14:46:46, Josh Poimboeuf wrote: > > On Tue, Jan 10, 2017 at 02:00:58PM +0100, Petr Mladek wrote: > > > On Thu 2016-12-22 12:31:37, Josh Poimboeuf wrote: > > > > On Thu, Dec 22, 2016 at 03:34:52PM +0100, Petr Mladek wro

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-11 Thread Petr Mladek
On Tue 2017-01-10 14:46:46, Josh Poimboeuf wrote: > On Tue, Jan 10, 2017 at 02:00:58PM +0100, Petr Mladek wrote: > > On Thu 2016-12-22 12:31:37, Josh Poimboeuf wrote: > > > On Thu, Dec 22, 2016 at 03:34:52PM +0100, Petr Mladek wrote: > > > > On Wed 2016-12-21 15:25:05, Josh Poimboeuf wrote: > > > >

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-10 Thread Josh Poimboeuf
On Tue, Jan 10, 2017 at 02:00:58PM +0100, Petr Mladek wrote: > On Thu 2016-12-22 12:31:37, Josh Poimboeuf wrote: > > On Thu, Dec 22, 2016 at 03:34:52PM +0100, Petr Mladek wrote: > > > On Wed 2016-12-21 15:25:05, Josh Poimboeuf wrote: > > > > On Tue, Dec 20, 2016 at 06:32:46PM +0100, Petr Mladek wro

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-10 Thread Petr Mladek
On Thu 2016-12-22 12:31:37, Josh Poimboeuf wrote: > On Thu, Dec 22, 2016 at 03:34:52PM +0100, Petr Mladek wrote: > > On Wed 2016-12-21 15:25:05, Josh Poimboeuf wrote: > > > On Tue, Dec 20, 2016 at 06:32:46PM +0100, Petr Mladek wrote: > > > > On Thu 2016-12-08 12:08:38, Josh Poimboeuf wrote: > > > >

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-10 Thread Miroslav Benes
> > > --- a/kernel/sched/idle.c > > > +++ b/kernel/sched/idle.c > > > @@ -9,6 +9,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #include > > > > > > @@ -264,6 +265,9 @@ static void do_idle(void) > > > > > > sched_ttwu_pending(); > > > schedule_pree

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-10 Thread Petr Mladek
On Fri 2017-01-06 14:07:34, Josh Poimboeuf wrote: > On Fri, Dec 23, 2016 at 11:18:03AM +0100, Petr Mladek wrote: > > On Fri 2016-12-23 10:24:35, Miroslav Benes wrote: > > > > > > diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c > > > > > > index 5efa262..e79ebb5 100644 > > > > > > -

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-06 Thread Josh Poimboeuf
On Thu, Jan 05, 2017 at 10:34:57AM +0100, Miroslav Benes wrote: > > > @@ -740,6 +809,14 @@ int klp_register_patch(struct klp_patch *patch) > > return -ENODEV; > > > > /* > > +* Architectures without reliable stack traces have to set > > +* patch->immediate because there's

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-06 Thread Josh Poimboeuf
On Wed, Jan 04, 2017 at 02:44:47PM +0100, Miroslav Benes wrote: > On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > > > +void klp_start_transition(void) > > +{ > > + struct task_struct *g, *task; > > + unsigned int cpu; > > + > > + WARN_ON_ONCE(klp_target_state == KLP_UNDEFINED); > > + > > + pr_

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-06 Thread Josh Poimboeuf
On Fri, Dec 23, 2016 at 11:18:03AM +0100, Petr Mladek wrote: > On Fri 2016-12-23 10:24:35, Miroslav Benes wrote: > > > > > diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c > > > > > index 5efa262..e79ebb5 100644 > > > > > --- a/kernel/livepatch/patch.c > > > > > +++ b/kernel/livepat

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-05 Thread Miroslav Benes
> @@ -740,6 +809,14 @@ int klp_register_patch(struct klp_patch *patch) > return -ENODEV; > > /* > + * Architectures without reliable stack traces have to set > + * patch->immediate because there's currently no way to patch kthreads > + * with the consistency mo

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2017-01-04 Thread Miroslav Benes
On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > +void klp_start_transition(void) > +{ > + struct task_struct *g, *task; > + unsigned int cpu; > + > + WARN_ON_ONCE(klp_target_state == KLP_UNDEFINED); > + > + pr_notice("'%s': %s...\n", klp_transition_patch->mod->name, > + k

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-23 Thread Petr Mladek
On Fri 2016-12-23 10:24:35, Miroslav Benes wrote: > > > > diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c > > > > index 5efa262..e79ebb5 100644 > > > > --- a/kernel/livepatch/patch.c > > > > +++ b/kernel/livepatch/patch.c > > > > @@ -29,6 +29,7 @@ > > > > #include > > > > #inclu

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-23 Thread Miroslav Benes
> > > diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c > > > index 5efa262..e79ebb5 100644 > > > --- a/kernel/livepatch/patch.c > > > +++ b/kernel/livepatch/patch.c > > > @@ -29,6 +29,7 @@ > > > #include > > > #include > > > #include "patch.h" > > > +#include "transition.h" > >

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-22 Thread Josh Poimboeuf
On Thu, Dec 22, 2016 at 03:34:52PM +0100, Petr Mladek wrote: > On Wed 2016-12-21 15:25:05, Josh Poimboeuf wrote: > > On Tue, Dec 20, 2016 at 06:32:46PM +0100, Petr Mladek wrote: > > > On Thu 2016-12-08 12:08:38, Josh Poimboeuf wrote: > > > > Change livepatch to use a basic per-task consistency mode

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-22 Thread Petr Mladek
On Wed 2016-12-21 15:25:05, Josh Poimboeuf wrote: > On Tue, Dec 20, 2016 at 06:32:46PM +0100, Petr Mladek wrote: > > On Thu 2016-12-08 12:08:38, Josh Poimboeuf wrote: > > > Change livepatch to use a basic per-task consistency model. This is the > > > foundation which will eventually enable us to p

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-21 Thread Josh Poimboeuf
On Tue, Dec 20, 2016 at 06:32:46PM +0100, Petr Mladek wrote: > On Thu 2016-12-08 12:08:38, Josh Poimboeuf wrote: > > Change livepatch to use a basic per-task consistency model. This is the > > foundation which will eventually enable us to patch those ~10% of > > security patches which change funct

Re: [PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-20 Thread Petr Mladek
On Thu 2016-12-08 12:08:38, Josh Poimboeuf wrote: > Change livepatch to use a basic per-task consistency model. This is the > foundation which will eventually enable us to patch those ~10% of > security patches which change function or data semantics. This is the > biggest remaining piece needed

[PATCH v3 13/15] livepatch: change to a per-task consistency model

2016-12-08 Thread Josh Poimboeuf
Change livepatch to use a basic per-task consistency model. This is the foundation which will eventually enable us to patch those ~10% of security patches which change function or data semantics. This is the biggest remaining piece needed to make livepatch more generally useful. This code stems