From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Miroslav Benes <mbenes@suse.cz>
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>,
Petr Mladek <pmladek@suse.com>,
Chris J Arges <chris.j.arges@canonical.com>
Subject: Re: [PATCH] livepatch: add (un)patch hooks
Date: Tue, 18 Jul 2017 21:08:57 -0500 [thread overview]
Message-ID: <20170719020857.6gvkw4di2vjmk2ii@treble> (raw)
In-Reply-To: <alpine.LSU.2.20.1707181310550.24826@pobox.suse.cz>
On Tue, Jul 18, 2017 at 01:15:16PM +0200, Miroslav Benes wrote:
> On Thu, 13 Jul 2017, Josh Poimboeuf wrote:
>
> > On Wed, Jul 12, 2017 at 10:10:00AM -0400, Joe Lawrence wrote:
> > > When the livepatch core executes klp_(un)patch_object, call out to a
> > > livepatch-module specified array of callback hooks. These hooks provide
> > > a notification mechanism for livepatch modules when klp_objects are
> > > (un)patching. This may be most interesting when another kernel module
> > > is a klp_object target and the livepatch module needs to execute code
> > > after the target is loaded, but before its module_init code is run.
> >
> > And it's also useful for vmlinux. Patch module load/unload is separate
> > from enable/disable, so the module init/exit functions can't be used for
> > patch-specific changes (e.g., global data changes).
>
> I admit that I don't understand this, which is probably the reason for my
> question. Why do we need it when we have module notifiers and module
> init/exit functions in the kernel? Petr described different possible
> scenarios and they can be solved either in init/exit function of a patch
> module or in a module notifier which the patch module can register.
>
> If there is a difference, it should be mentioned in the documentation and
> in the changelog.
Some differences:
- The patch module init/exit code doesn't run when disabling and
re-enabling a patch.
- The module notifier can't stop the to-be-patched module from loading.
--
Josh
next prev parent reply other threads:[~2017-07-19 2:09 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 [this message]
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
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=20170719020857.6gvkw4di2vjmk2ii@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®