Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-18 Thread Petr Mladek
On Mon 2016-05-16 13:12:50, Josh Poimboeuf wrote: > On Mon, May 09, 2016 at 02:23:03PM +0200, Petr Mladek wrote: > > On Fri 2016-05-06 07:38:55, Josh Poimboeuf wrote: > > > On Thu, May 05, 2016 at 01:57:01PM +0200, Petr Mladek wrote: > > > > I have missed that the two commands are called with

Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-16 Thread Josh Poimboeuf
On Mon, May 09, 2016 at 02:23:03PM +0200, Petr Mladek wrote: > On Fri 2016-05-06 07:38:55, Josh Poimboeuf wrote: > > On Thu, May 05, 2016 at 01:57:01PM +0200, Petr Mladek wrote: > > > I have missed that the two commands are called with preemption > > > disabled. So, I had the following crazy

Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-09 Thread Petr Mladek
On Fri 2016-05-06 07:38:55, Josh Poimboeuf wrote: > On Thu, May 05, 2016 at 01:57:01PM +0200, Petr Mladek wrote: > > I have missed that the two commands are called with preemption > > disabled. So, I had the following crazy scenario in mind: > > > > > > CPU0CPU1 >

Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-06 Thread Josh Poimboeuf
On Thu, May 05, 2016 at 01:57:01PM +0200, Petr Mladek wrote: > I have missed that the two commands are called with preemption > disabled. So, I had the following crazy scenario in mind: > > > CPU0 CPU1 > > klp_enable_patch() > > klp_target_state = KLP_PATCHED; > >

Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-05 Thread Petr Mladek
On Wed 2016-05-04 12:57:00, Josh Poimboeuf wrote: > On Wed, May 04, 2016 at 04:48:54PM +0200, Petr Mladek wrote: > > On Thu 2016-04-28 15:44:48, Josh Poimboeuf wrote: > > > Change livepatch to use a basic per-task consistency model. This is the > > > foundation which will eventually enable us to

Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-04 Thread Josh Poimboeuf
On Wed, May 04, 2016 at 04:48:54PM +0200, Petr Mladek wrote: > On Thu 2016-04-28 15:44:48, 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

Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-04 Thread Jiri Kosina
On Wed, 4 May 2016, Petr Mladek wrote: > > + > > + if (unlikely(klp_patch_pending(current))) > > + klp_patch_task(current); > > } > > Some more ideas from the world of crazy races. I was shaking my head > if this was safe or not. > > The problem might be if the

klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

2016-05-04 Thread Petr Mladek
On Thu 2016-04-28 15:44:48, 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