Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-30 Thread Josh Poimboeuf
On Mon, May 29, 2017 at 02:28:13PM +0200, Petr Mladek wrote: > On Fri 2017-05-26 12:37:56, Josh Poimboeuf wrote: > > On Thu, May 25, 2017 at 06:03:07PM +0200, Petr Mladek wrote: > > > On Thu 2017-05-25 14:59:55, Miroslav Benes wrote: > > > > > > > > > > > In fact, I would suggest to take klp_mutex

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-29 Thread Petr Mladek
On Fri 2017-05-26 12:37:56, Josh Poimboeuf wrote: > On Thu, May 25, 2017 at 06:03:07PM +0200, Petr Mladek wrote: > > On Thu 2017-05-25 14:59:55, Miroslav Benes wrote: > > > > > > > > > In fact, I would suggest to take klp_mutex in force_store() > > > > > > and do all actions synchronously, includi

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-29 Thread Miroslav Benes
On Fri, 26 May 2017, Josh Poimboeuf wrote: > On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > > @@ -591,3 +591,19 @@ void klp_send_fake_signal(void) > > } > > read_unlock(&tasklist_lock); > > } > > + > > +/* > > + * Drop TIF_PATCH_PENDING of all tasks on admin's request.

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-26 Thread Josh Poimboeuf
On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > @@ -591,3 +591,19 @@ void klp_send_fake_signal(void) > } > read_unlock(&tasklist_lock); > } > + > +/* > + * Drop TIF_PATCH_PENDING of all tasks on admin's request. This forces an > + * existing transition to finish. > +

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-26 Thread Josh Poimboeuf
On Thu, May 25, 2017 at 06:03:07PM +0200, Petr Mladek wrote: > On Thu 2017-05-25 14:59:55, Miroslav Benes wrote: > > > > > > > In fact, I would suggest to take klp_mutex in force_store() > > > > > and do all actions synchronously, including the check > > > > > of klp_transition_patch. > > > > > >

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-25 Thread Petr Mladek
On Thu 2017-05-25 14:59:55, Miroslav Benes wrote: > > > > > In fact, I would suggest to take klp_mutex in force_store() > > > > and do all actions synchronously, including the check > > > > of klp_transition_patch. > > > > > > I still think it is better not do it. klp_unmark_tasks() does nothing

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-25 Thread Miroslav Benes
> > > In fact, I would suggest to take klp_mutex in force_store() > > > and do all actions synchronously, including the check > > > of klp_transition_patch. > > > > I still think it is better not do it. klp_unmark_tasks() does nothing else > > than tasks already do. They call klp_update_patch_st

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Petr Mladek
On Wed 2017-05-24 16:15:49, Miroslav Benes wrote: > On Wed, 24 May 2017, Petr Mladek wrote: > > > On Thu 2017-05-18 14:00:43, Miroslav Benes wrote: > > > If a task sleeps in a set of patched functions uninterruptibly, it could > > > block the whole transition process indefinitely. Thus it may be

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Miroslav Benes
On Wed, 24 May 2017, Petr Mladek wrote: > On Thu 2017-05-18 14:00:43, Miroslav Benes wrote: > > If a task sleeps in a set of patched functions uninterruptibly, it could > > block the whole transition process indefinitely. Thus it may be useful > > to clear its TIF_PATCH_PENDING to allow the proce

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Petr Mladek
On Thu 2017-05-18 14:00:43, Miroslav Benes wrote: > If a task sleeps in a set of patched functions uninterruptibly, it could > block the whole transition process indefinitely. Thus it may be useful > to clear its TIF_PATCH_PENDING to allow the process to finish. > > Admin can do that now by writi

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Miroslav Benes
On Tue, 23 May 2017, Josh Poimboeuf wrote: > On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > > If a task sleeps in a set of patched functions uninterruptibly, it could > > block the whole transition process indefinitely. Thus it may be useful > > to clear its TIF_PATCH_PENDING t

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-23 Thread Josh Poimboeuf
On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > If a task sleeps in a set of patched functions uninterruptibly, it could > block the whole transition process indefinitely. Thus it may be useful > to clear its TIF_PATCH_PENDING to allow the process to finish. > > Admin can do tha

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:43, Miroslav Benes wrote: > [...] > > Admin can do that now by writing 2 to force sysfs attribute in livepatch > > sysfs directory. TIF_PATCH_PENDING is then cleared for all tasks and the > > transition can finish successfully. > [

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-18 Thread Libor Pechacek
On Thu 18-05-17 14:00:43, Miroslav Benes wrote: [...] > Admin can do that now by writing 2 to force sysfs attribute in livepatch > sysfs directory. TIF_PATCH_PENDING is then cleared for all tasks and the > transition can finish successfully. [...] > --- a/include/linux/livepatch.h > +++ b/include/l