From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Joe Lawrence <joe.lawrence@redhat.com>,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
Jessica Yu <jeyu@kernel.org>, Jiri Kosina <jikos@kernel.org>,
Miroslav Benes <mbenes@suse.cz>,
Chris J Arges <chris.j.arges@canonical.com>
Subject: Re: [PATCH] livepatch: add (un)patch hooks
Date: Thu, 20 Jul 2017 12:04:12 -0500 [thread overview]
Message-ID: <20170720170412.amkpdaqx57jwo2ux@treble> (raw)
In-Reply-To: <20170720155004.GB13895@pathway.suse.cz>
On Thu, Jul 20, 2017 at 05:50:04PM +0200, Petr Mladek wrote:
> On Wed 2017-07-19 23:17:23, Josh Poimboeuf wrote:
> > - patching otherwise unpatchable code (i.e., assembly)
> >
> > In many/most cases, it seems like stop_machine() would be very useful
> > to avoid concurrency issues.
>
> I am not sure if stop_machine() would help here. It would make sense
> in kPatch where also the ftrace handlers are added during
> stop_machine(). Then it is possible to synchronize both operations
> (hooks, enabling ftrace handlers) and do everything "atomically".
>
> IMHO, the big advantage of livepatch framework is that stop_machine()
> is not needed. I hope that it will stay this way.
>
> Also it might need some additional support. You would want to stop
> the machine to make sure that it is safe to do a change. Then
> we might need to check stacks, ...
Don't worry. I much prefer our current consistency model to kpatch, and
I have no intention of changing it :-)
That said, for the hooks, I still think stop_machine() will be helpful
in some cases where you need to ensure no other code is running. Like
the stack_segment patch I posted, for example.
Anyway I'm not suggesting we do the stop_machine() in livepatch code
itself. I'm just hoping it will work from a hook, in case the patch
author needs to do it as a last resort.
--
Josh
next prev parent reply other threads:[~2017-07-20 17:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 14:09 [PATCH] livepatch hooks, revisted Joe Lawrence
2017-07-12 14:10 ` [PATCH] livepatch: add (un)patch hooks Joe Lawrence
2017-07-14 1:46 ` Josh Poimboeuf
2017-07-14 13:23 ` Joe Lawrence
2017-07-14 13:46 ` Josh Poimboeuf
2017-07-18 11:10 ` Miroslav Benes
2017-07-18 11:15 ` Miroslav Benes
2017-07-19 2:08 ` Josh Poimboeuf
2017-07-19 15:29 ` Petr Mladek
2017-07-19 19:11 ` Miroslav Benes
2017-07-17 15:51 ` Petr Mladek
2017-07-19 18:59 ` Joe Lawrence
2017-07-20 14:36 ` Petr Mladek
2017-07-19 20:49 ` Josh Poimboeuf
2017-07-20 4:17 ` Josh Poimboeuf
2017-07-20 4:20 ` Josh Poimboeuf
2017-07-20 4:30 ` Josh Poimboeuf
2017-07-20 15:50 ` Petr Mladek
2017-07-20 17:04 ` Josh Poimboeuf [this message]
2017-07-27 20:43 ` Joe Lawrence
2017-07-27 21:36 ` Josh Poimboeuf
2017-07-28 18:08 ` Joe Lawrence
2017-07-28 18:29 ` Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170720170412.amkpdaqx57jwo2ux@treble \
--to=jpoimboe@redhat.com \
--cc=chris.j.arges@canonical.com \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®