mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Petr Mladek <pmladek@suse.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: Fri, 28 Jul 2017 14:08:33 -0400	[thread overview]
Message-ID: <ffc9a367-8cbd-9461-4e10-2a2a32637104@redhat.com> (raw)
In-Reply-To: <20170727213600.52rwakraq3yddojs@treble>

On 07/27/2017 05:36 PM, Josh Poimboeuf wrote:
> On Thu, Jul 27, 2017 at 04:43:58PM -0400, Joe Lawrence wrote:
>> On 07/20/2017 12:17 AM, Josh Poimboeuf wrote:
>>> - The post-patch and post-unpatch hooks will need to be run from either
>>>   klp_complete_transition() or klp_module_coming/going(), depending on
>>>   whether the to-be-patched module is already loaded or is being
>>>   loaded/unloaded.
>>
>> You're suggesting that post-(un)patch-hooks:
>>
>>   1 - Notify klp_objects when a KLP_(UN)PATCHED transition completes
> 
> Right. (From klp_complete_transition())

We should be careful to only call hooks for those klp_objects that were
actually (un)patched.  I don't think there is such state that makes it
all the way out to klp_complete_transition(), but since both the
completion and module_coming/going code both operate under the
klp_mutex, perhaps klp_is_object_loaded() is a sufficient check?

>> and for subsequently loaded klp_objects (ie modules):
>>
>>   2 - On load - notify it with current KLP_(UN)PATCHED state,
>>       Steady state - same as (1) above.
> 
> Right. (From klp_module_coming/going())
> 

At least this should be easier to implement since we know what the story
is for the klp_object in hand.

-- Joe

  reply	other threads:[~2017-07-28 18:08 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
2017-07-27 20:43         ` Joe Lawrence
2017-07-27 21:36           ` Josh Poimboeuf
2017-07-28 18:08             ` Joe Lawrence [this message]
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=ffc9a367-8cbd-9461-4e10-2a2a32637104@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=chris.j.arges@canonical.com \
    --cc=jeyu@kernel.org \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@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

Powered by JetHome