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

2017-02-09 Thread Petr Mladek
On Wed 2017-02-08 10:46:36, Josh Poimboeuf wrote: > On Wed, Feb 08, 2017 at 04:47:50PM +0100, Petr Mladek wrote: > > > Notice in this case that klp_target_state is KLP_PATCHED. Which means > > > that klp_complete_transition() would not call synchronize_rcu() at the > > > right time, nor would it c

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

2017-02-08 Thread Josh Poimboeuf
On Wed, Feb 08, 2017 at 04:47:50PM +0100, Petr Mladek wrote: > > Notice in this case that klp_target_state is KLP_PATCHED. Which means > > that klp_complete_transition() would not call synchronize_rcu() at the > > right time, nor would it call module_put(). It can be fixed with: > > > > @@ -387,7

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

2017-02-08 Thread Petr Mladek
On Mon 2017-02-06 13:51:48, Josh Poimboeuf wrote: > On Mon, Feb 06, 2017 at 05:44:31PM +0100, Petr Mladek wrote: > > > > > @@ -347,22 +354,37 @@ static int __klp_enable_patch(struct klp_patch > > > > > *patch) > > > > > > > > > > pr_notice("enabling patch '%s'\n", patch->mod->name); > > >

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

2017-02-07 Thread Miroslav Benes
> > And finally, the section "Limitations" has this text under the first > > bullet: > > > > + The patch must not change the semantic of the patched functions. > > > > The current implementation guarantees only that either the old > > or the new function is called. The functions are p

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

2017-02-06 Thread Josh Poimboeuf
On Mon, Feb 06, 2017 at 05:44:31PM +0100, Petr Mladek wrote: > > > > @@ -347,22 +354,37 @@ static int __klp_enable_patch(struct klp_patch > > > > *patch) > > > > > > > > pr_notice("enabling patch '%s'\n", patch->mod->name); > > > > > > > > + klp_init_transition(patch, KLP_PATCHED

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

2017-02-06 Thread Petr Mladek
On Fri 2017-02-03 14:39:16, Josh Poimboeuf wrote: > On Thu, Feb 02, 2017 at 12:51:16PM +0100, Petr Mladek wrote: > > !!! This is the right version. I am sorry again for the confusion. !!! > > > > > static int __klp_disable_patch(struct klp_patch *patch) > > > { > > > - struct klp_object *obj; > >

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

2017-02-06 Thread Josh Poimboeuf
On Fri, Feb 03, 2017 at 05:41:28PM +0100, Miroslav Benes wrote: > > Petr has already mentioned majority of things I too found out, so only > couple of nits... > > > diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch > > b/Documentation/ABI/testing/sysfs-kernel-livepatch > > index da8

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

2017-02-03 Thread Josh Poimboeuf
On Thu, Feb 02, 2017 at 12:51:16PM +0100, Petr Mladek wrote: > !!! This is the right version. I am sorry again for the confusion. !!! > > > 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 pa

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

2017-02-03 Thread Miroslav Benes
Petr has already mentioned majority of things I too found out, so only couple of nits... > diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch > b/Documentation/ABI/testing/sysfs-kernel-livepatch > index da87f43..24b6570 100644 > --- a/Documentation/ABI/testing/sysfs-kernel-livepatch

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

2017-02-03 Thread Miroslav Benes
On Thu, 2 Feb 2017, Petr Mladek wrote: > > diff --git a/Documentation/livepatch/livepatch.txt > > b/Documentation/livepatch/livepatch.txt > > index 7f04e13..fb00d66 100644 > > --- a/Documentation/livepatch/livepatch.txt > > +++ b/Documentation/livepatch/livepatch.txt > > > + In that case, arche

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

2017-02-02 Thread Petr Mladek
!!! This is the right version. I am sorry again for the confusion. !!! > 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 r

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

2017-02-02 Thread Petr Mladek
IMPORTANT: Please, forget this version. It is few days old and incomplete and probably wrong. I am sorry for confusion. Best Regards, Petr

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

2017-02-02 Thread Petr Mladek
On Thu 2017-01-19 09:46:21, 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