mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	 Nicolai Stange <nstange@suse.de>,
	live-patching@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [POC 0/7] livepatch: Make livepatch states, callbacks, and shadow variables work together
Date: Thu, 25 Jul 2024 16:19:30 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.21.2407251618220.21729@pobox.suse.cz> (raw)
In-Reply-To: <20231110213317.g4wz3j3flj7u2qg2@treble>

On Fri, 10 Nov 2023, Josh Poimboeuf wrote:

> On Fri, Nov 10, 2023 at 06:04:21PM +0100, Petr Mladek wrote:
> > This POC is a material for the discussion "Simplify Livepatch Callbacks,
> > Shadow Variables, and States handling" at LPC 2013, see
> > https://lpc.events/event/17/contributions/1541/
> > 
> > It obsoletes the patchset adding the garbage collection of shadow
> > variables. This new solution is based on ideas from Nicolai Stange.
> > And it should also be in sync with Josh's ideas mentioned into
> > the thread about the garbage collection, see
> > https://lore.kernel.org/r/20230204235910.4j4ame5ntqogqi7m@treble
> 
> Nice!  I like how it brings the "features" together and makes them easy
> to use.  This looks like a vast improvement.
> 
> Was there a reason to change the naming?  I'm thinking
> 
>   setup / enable / disable / release
> 
> is less precise than
> 
>   pre_patch / post_patch / pre_unpatch / post_unpatch.
> 
> Also, I'm thinking "replaced" instead of "obsolete" would be more
> consistent with the existing terminology.
> 
> For example, in __klp_enable_patch():
> 
> 	ret = klp_setup_states(patch);
> 	if (ret)
> 		goto err;
> 
> 	if (patch->replace)
> 		klp_disable_obsolete_states(patch);
> 
> it's not immediately clear why "disable obsolete" would be the "replace"
> counterpart to "setup".
> 
> Similarly, in klp_complete_transition():
> 
> 	if (klp_transition_patch->replace && klp_target_state == KLP_PATCHED) {
> 		klp_unpatch_replaced_patches(klp_transition_patch);
> 		klp_discard_nops(klp_transition_patch);
> 		klp_release_obsolete_states(klp_transition_patch);
> 	}
> 
> it's a little jarring to have "unpatch replaced" followed by "release
> obsolete".

I agree. I would also stick to the existing naming. It is clearer to me.

Miroslav

  reply	other threads:[~2024-07-25 14:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10 17:04 Petr Mladek
2023-11-10 17:04 ` [POC 1/7] livepatch: Add callbacks for introducing and removing states Petr Mladek
2023-11-11  0:54   ` kernel test robot
2023-11-11  3:19   ` kernel test robot
2023-11-10 17:04 ` [POC 2/7] livepatch: Allow to handle lifetime of shadow variables using the livepatch state Petr Mladek
2024-07-25 11:31   ` Miroslav Benes
2024-08-15 13:43     ` Petr Mladek
2023-11-10 17:04 ` [POC 3/7] livepatch: Use per-state callbacks in state API tests Petr Mladek
2024-07-25 11:48   ` Miroslav Benes
2024-08-16 16:02     ` Petr Mladek
2023-11-10 17:04 ` [POC 4/7] livepatch: Do not use callbacks when testing sysfs interface Petr Mladek
2023-11-10 17:04 ` [POC 5/7] livepatch: Convert klp module callbacks tests into livepatch module tests Petr Mladek
2023-11-11  1:15   ` kernel test robot
2024-07-25 12:22   ` Miroslav Benes
2023-11-10 17:04 ` [POC 6/7] livepatch: Remove the obsolete per-object callbacks Petr Mladek
2023-11-10 17:04 ` [POC 7/7] livepatching: Remove per-state version Petr Mladek
2024-07-25 14:16   ` Miroslav Benes
2024-08-15 14:00     ` Petr Mladek
2023-11-10 21:33 ` [POC 0/7] livepatch: Make livepatch states, callbacks, and shadow variables work together Josh Poimboeuf
2024-07-25 14:19   ` Miroslav Benes [this message]
2024-08-15 10:08     ` Petr Mladek
2024-07-25 14:22 ` Miroslav Benes
2024-07-25 14:40   ` Nicolai Stange
     [not found]   ` <66a263d5.170a0220.b2c84.1870SMTPIN_ADDED_BROKEN@mx.google.com>
2024-08-21 15:28     ` Petr Mladek

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=alpine.LSU.2.21.2407251618220.21729@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=nstange@suse.de \
    --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®