Re: [PATCH v2 2/3] livepatch: send a fake signal to all blocking tasks

2017-08-16 Thread Petr Mladek
On Thu 2017-08-10 12:48:14, Miroslav Benes wrote: > Live patching consistency model is of LEAVE_PATCHED_SET and > SWITCH_THREAD. This means that all tasks in the system have to be marked > one by one as safe to call a new patched function. Safe means when a > task is not (sleeping) in a set of

Re: [PATCH v2 2/3] livepatch: send a fake signal to all blocking tasks

2017-08-14 Thread Miroslav Benes
On Fri, 11 Aug 2017, Josh Poimboeuf wrote: > On Thu, Aug 10, 2017 at 12:48:14PM +0200, Miroslav Benes wrote: > > Last, sending the fake signal is not automatic. It is done only when > > admin requests it by writing 1 to force sysfs attribute in livepatch > > sysfs directory. > > 'writing 1' ->

Re: [PATCH v2 2/3] livepatch: send a fake signal to all blocking tasks

2017-08-12 Thread Jiri Kosina
On Fri, 11 Aug 2017, Josh Poimboeuf wrote: > > + read_lock(_lock); > > + for_each_process_thread(g, task) { > > + if (!klp_patch_pending(task)) > > + continue; > > + > > + /* > > +* There is a small race here. We could see TIF_PATCH_PENDING >

Re: [PATCH v2 2/3] livepatch: send a fake signal to all blocking tasks

2017-08-11 Thread Josh Poimboeuf
On Thu, Aug 10, 2017 at 12:48:14PM +0200, Miroslav Benes wrote: > Last, sending the fake signal is not automatic. It is done only when > admin requests it by writing 1 to force sysfs attribute in livepatch > sysfs directory. 'writing 1' -> 'writing "signal"' (unless you take my suggestion to