mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Jason Baron <jbaron@akamai.com>
Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org,
	jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org,
	pmladek@suse.com
Subject: Re: [PATCH 0/3] livepatch: introduce atomic replace
Date: Thu, 10 Aug 2017 13:12:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1708101254540.7971@pobox.suse.cz> (raw)
In-Reply-To: <2476c7a9-e962-8c20-2cf1-41befdd8ef95@akamai.com>


> Ok - associating the "atomic replace" with the patch itself makes sense to me.
> It would also basically work, I think with the patch I proposed except for the
> case where the the "atomic replace" was on top of several non-"atomic replace"
> patches. The reason is that the "atomic replace" I posted looks back 1 patch
> to see what it needs to replace (assuming all patches are in atomic replace
> mode). So instead of just looking back 1 patch, it could 'look back' and make
> sure it was replacing all previously loaded patches.

Yes, this should not be a problem to implement with the current code.

But I must say I am not entirely happy with the code as it is. The big 
advantage is that there are almost no changes to the consistency model. 
Almost everything is created and allocated during the initialization and 
the patch then looks ordinary. The current code can handle it smoothly. 
"Dynamic" superstructure is what I am not happy with. It is too 
complicated in my opinion. On the other hand I don't see a simple way out 
now.

1. We can try to make your code "nicer".

2. The main problem is that all user structures (klp_func, klp_object, 
klp_patch) are statically allocated in a kernel module. You need to add 
dynamically allocated structures, which is not easy. We can either change 
everything to dynamic allocation, or make everything static. As far as the 
former is concerned, we've been down that road IIRC. It didn't end up 
well. Is the latter even possible?

3. We could bypass everything and register special no-op fops to each 
reverted function. Those could be held and handled separately. It could be 
simpler, but it might be problematic to deal with the consistency model 
interaction.

Thoughts?

Regards,
Miroslav

  reply	other threads:[~2017-08-10 11:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 17:18 Jason Baron
2017-07-19 17:18 ` [PATCH 1/3] livepatch: Add klp_object and klp_func iterators Jason Baron
2017-08-24 14:25   ` Petr Mladek
2017-08-24 15:39     ` Jason Baron
2017-08-25 11:34       ` Petr Mladek
2017-07-19 17:18 ` [PATCH 2/3] livepatch: add atomic replace Jason Baron
2017-08-25  9:26   ` Petr Mladek
2017-08-25 11:53     ` Petr Mladek
2017-08-30 21:36     ` Jason Baron
2017-07-19 17:18 ` [PATCH 3/3] livepatch: Add a sysctl livepatch_mode for " Jason Baron
2017-07-21 13:06 ` [PATCH 0/3] livepatch: introduce " Miroslav Benes
2017-07-21 17:56   ` Jason Baron
2017-08-10 11:12     ` Miroslav Benes [this message]
2017-08-10 14:56       ` Jason Baron
2017-08-15  9:26         ` Miroslav Benes

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.20.1708101254540.7971@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=jbaron@akamai.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=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®