[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180410105625.4o4ozkpmanevytnh@pathway.suse.cz>
Date: Tue, 10 Apr 2018 12:56:25 +0200
From: Petr Mladek <pmladek@...e.com>
To: Miroslav Benes <mbenes@...e.cz>
Cc: Jiri Kosina <jikos@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jason Baron <jbaron@...mai.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Jessica Yu <jeyu@...nel.org>,
Evgenii Shatokhin <eshatokhin@...tuozzo.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] livepatch: Add an extra flag to distinguish
registered patches
On Mon 2018-04-09 16:02:15, Miroslav Benes wrote:
> On Fri, 23 Mar 2018, Petr Mladek wrote:
>
> > The initial implementation of the atomic replace feature keeps the replaced
> > patches on the stack. But people would like to remove the replaced patches
> > from different reasons that will be described in the following patch.
> >
> > This patch is just a small preparation step. We will need to keep
> > the replaced patches registered even when they are not longer on the stack.
>
> In my opinion it could be easier for a review to squash the patch into the
> next one.
OK, I'll squash them.
> > diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
> > index f28af280f9e0..d6e6d8176995 100644
> > --- a/include/linux/livepatch.h
> > +++ b/include/linux/livepatch.h
> > @@ -378,7 +383,7 @@ int klp_disable_patch(struct klp_patch *patch)
> >
> > mutex_lock(&klp_mutex);
> >
> > - if (!klp_is_patch_registered(patch)) {
> > + if (!patch->registered) {
>
> I don't see any actual problem, but I'd feel safer if we preserve
> klp_is_patch_on_stack() even somewhere in disable path.
It is strictly needed in klp_enable_patch() which will be better
visible if I squash it with the next patch.
The use in klp_disable_patch() is optional. I do not have problems
to add it there though. If Josh does not see it as too paranoid,
I'll add it.
Best Regards,
Petr
Powered by blists - more mailing lists