Re: [PATCH 4/4] livepatch: Remove the redundant enabled flag in struct klp_patch

2019-01-30 Thread Petr Mladek
On Tue 2019-01-29 14:00:49, Josh Poimboeuf wrote: > On Wed, Jan 23, 2019 at 01:27:59PM -0500, Joe Lawrence wrote: > > > I wanted to ask why there is list_empty() and not klp_patch_enabled(), so > > > just to be sure... the patch was added to klp_patches list, so patch->list > > > is not empty (shou

Re: [PATCH 4/4] livepatch: Remove the redundant enabled flag in struct klp_patch

2019-01-29 Thread Josh Poimboeuf
On Wed, Jan 23, 2019 at 01:27:59PM -0500, Joe Lawrence wrote: > > I wanted to ask why there is list_empty() and not klp_patch_enabled(), so > > just to be sure... the patch was added to klp_patches list, so patch->list > > is not empty (should not be). We could achieve the same by calling > > !klp_

Re: [PATCH 4/4] livepatch: Remove the redundant enabled flag in struct klp_patch

2019-01-23 Thread Joe Lawrence
On 1/22/19 5:06 AM, Miroslav Benes wrote: On Wed, 16 Jan 2019, Petr Mladek wrote: diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 684766d306ad..8e644837e668 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -59,6 +59,17 @@ static bool klp_is_module(struc

Re: [PATCH 4/4] livepatch: Remove the redundant enabled flag in struct klp_patch

2019-01-22 Thread Miroslav Benes
On Wed, 16 Jan 2019, Petr Mladek wrote: > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index 684766d306ad..8e644837e668 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -59,6 +59,17 @@ static bool klp_is_module(struct klp_object *obj) > return o

Re: [PATCH 4/4] livepatch: Remove the redundant enabled flag in struct klp_patch

2019-01-21 Thread Joe Lawrence
On Wed, Jan 16, 2019 at 05:17:20PM +0100, Petr Mladek wrote: > Livepatches can not longer get enabled and disabled repeatedly. nit: s/not longer/no longer/g > The list klp_patches contains only enabled patches and eventually > the patch in transition. As a result, the enabled flag in > struct klp

[PATCH 4/4] livepatch: Remove the redundant enabled flag in struct klp_patch

2019-01-16 Thread Petr Mladek
Livepatches can not longer get enabled and disabled repeatedly. The list klp_patches contains only enabled patches and eventually the patch in transition. As a result, the enabled flag in struct klp_patch provides redundant information and can get removed. The flag is replaced by helper function k