Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-17 Thread Miroslav Benes
On Tue, 17 Feb 2015, Josh Poimboeuf wrote: > On Mon, Feb 16, 2015 at 05:06:15PM +0100, Miroslav Benes wrote: > > On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > > > > > On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: > > > > On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > > > > > Hm,

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-17 Thread Josh Poimboeuf
On Mon, Feb 16, 2015 at 05:06:15PM +0100, Miroslav Benes wrote: > On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > > > On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: > > > On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > > > > Hm, even with Jiri Slaby's suggested fix to add the

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-17 Thread Josh Poimboeuf
On Mon, Feb 16, 2015 at 05:06:15PM +0100, Miroslav Benes wrote: On Fri, 13 Feb 2015, Josh Poimboeuf wrote: On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: On Fri, 13 Feb 2015, Josh Poimboeuf wrote: Hm, even with Jiri Slaby's suggested fix to add the completion to the

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-17 Thread Miroslav Benes
On Tue, 17 Feb 2015, Josh Poimboeuf wrote: On Mon, Feb 16, 2015 at 05:06:15PM +0100, Miroslav Benes wrote: On Fri, 13 Feb 2015, Josh Poimboeuf wrote: On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: On Fri, 13 Feb 2015, Josh Poimboeuf wrote: Hm, even with Jiri

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-16 Thread Miroslav Benes
On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: > > On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > > > Hm, even with Jiri Slaby's suggested fix to add the completion to the > > > unregister path, I still get a lockdep warning. This looks

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-16 Thread Miroslav Benes
On Fri, 13 Feb 2015, Josh Poimboeuf wrote: On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: On Fri, 13 Feb 2015, Josh Poimboeuf wrote: Hm, even with Jiri Slaby's suggested fix to add the completion to the unregister path, I still get a lockdep warning. This looks more

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Josh Poimboeuf
On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: > On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > > Hm, even with Jiri Slaby's suggested fix to add the completion to the > > unregister path, I still get a lockdep warning. This looks more insidious, > > related to the locking order of

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Miroslav Benes
On Fri, 13 Feb 2015, Josh Poimboeuf wrote: > On Thu, Feb 12, 2015 at 04:22:24PM +0100, Miroslav Benes wrote: > > On Tue, 10 Feb 2015, Jiri Slaby wrote: > > > > > On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > > > > --- a/kernel/livepatch/core.c > > > > +++ b/kernel/livepatch/core.c > > > ... >

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Josh Poimboeuf
On Thu, Feb 12, 2015 at 04:22:24PM +0100, Miroslav Benes wrote: > On Tue, 10 Feb 2015, Jiri Slaby wrote: > > > On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > > > --- a/kernel/livepatch/core.c > > > +++ b/kernel/livepatch/core.c > > ... > > > @@ -497,10 +500,6 @@ static struct attribute

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Josh Poimboeuf
On Thu, Feb 12, 2015 at 04:22:24PM +0100, Miroslav Benes wrote: > On Tue, 10 Feb 2015, Jiri Slaby wrote: > > > On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > > > --- a/kernel/livepatch/core.c > > > +++ b/kernel/livepatch/core.c > > ... > > > @@ -497,10 +500,6 @@ static struct attribute

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Miroslav Benes
On Fri, 13 Feb 2015, Josh Poimboeuf wrote: On Thu, Feb 12, 2015 at 04:22:24PM +0100, Miroslav Benes wrote: On Tue, 10 Feb 2015, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Josh Poimboeuf
On Thu, Feb 12, 2015 at 04:22:24PM +0100, Miroslav Benes wrote: On Tue, 10 Feb 2015, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = {

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Josh Poimboeuf
On Fri, Feb 13, 2015 at 05:17:10PM +0100, Miroslav Benes wrote: On Fri, 13 Feb 2015, Josh Poimboeuf wrote: Hm, even with Jiri Slaby's suggested fix to add the completion to the unregister path, I still get a lockdep warning. This looks more insidious, related to the locking order of a

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-13 Thread Josh Poimboeuf
On Thu, Feb 12, 2015 at 04:22:24PM +0100, Miroslav Benes wrote: On Tue, 10 Feb 2015, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = {

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-12 Thread Miroslav Benes
On Tue, 10 Feb 2015, Jiri Slaby wrote: > On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > > --- a/kernel/livepatch/core.c > > +++ b/kernel/livepatch/core.c > ... > > @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { > > > > static void klp_kobj_release_patch(struct kobject

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-12 Thread Miroslav Benes
On Tue, 10 Feb 2015, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { static void klp_kobj_release_patch(struct kobject *kobj) {

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-11 Thread Josh Poimboeuf
On Wed, Feb 11, 2015 at 11:55:05AM +0100, Jiri Slaby wrote: > On 02/10/2015, 08:57 PM, Josh Poimboeuf wrote: > > On Tue, Feb 10, 2015 at 08:02:34PM +0100, Jiri Slaby wrote: > >> On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > >>> --- a/kernel/livepatch/core.c > >>> +++ b/kernel/livepatch/core.c >

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-11 Thread Jiri Slaby
On 02/10/2015, 08:57 PM, Josh Poimboeuf wrote: > On Tue, Feb 10, 2015 at 08:02:34PM +0100, Jiri Slaby wrote: >> On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: >>> --- a/kernel/livepatch/core.c >>> +++ b/kernel/livepatch/core.c >> ... >>> @@ -497,10 +500,6 @@ static struct attribute

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-11 Thread Josh Poimboeuf
On Wed, Feb 11, 2015 at 11:55:05AM +0100, Jiri Slaby wrote: On 02/10/2015, 08:57 PM, Josh Poimboeuf wrote: On Tue, Feb 10, 2015 at 08:02:34PM +0100, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-11 Thread Jiri Slaby
On 02/10/2015, 08:57 PM, Josh Poimboeuf wrote: On Tue, Feb 10, 2015 at 08:02:34PM +0100, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = {

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-10 Thread Josh Poimboeuf
On Tue, Feb 10, 2015 at 08:02:34PM +0100, Jiri Slaby wrote: > On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > > --- a/kernel/livepatch/core.c > > +++ b/kernel/livepatch/core.c > ... > > @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { > > > > static void

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-10 Thread Jiri Slaby
On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c ... > @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { > > static void klp_kobj_release_patch(struct kobject *kobj) > { > - /* > - * Once we have a

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-10 Thread Jiri Slaby
On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { static void klp_kobj_release_patch(struct kobject *kobj) { - /* - * Once we have a consistency

Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-10 Thread Josh Poimboeuf
On Tue, Feb 10, 2015 at 08:02:34PM +0100, Jiri Slaby wrote: On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c ... @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { static void klp_kobj_release_patch(struct

[RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-09 Thread Josh Poimboeuf
Now that we have a consistency model we can detect when unpatching is complete and the patch module can be safely removed. Signed-off-by: Josh Poimboeuf --- kernel/livepatch/core.c | 25 - kernel/livepatch/transition.c | 3 +++ 2 files changed, 7 insertions(+), 21

[RFC PATCH 8/9] livepatch: allow patch modules to be removed

2015-02-09 Thread Josh Poimboeuf
Now that we have a consistency model we can detect when unpatching is complete and the patch module can be safely removed. Signed-off-by: Josh Poimboeuf jpoim...@redhat.com --- kernel/livepatch/core.c | 25 - kernel/livepatch/transition.c | 3 +++ 2 files changed,