archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <>
To: Joe Lawrence <>
Cc: Petr Mladek <>,,
Subject: Re: refactoring livepatch documentation was Re: [PATCH 1/2] docs/livepatch: Add new compiler considerations doc
Date: Tue, 1 Sep 2020 12:12:20 -0500	[thread overview]
Message-ID: <20200901171220.pgepj3hxrfwy37rj@treble> (raw)
In-Reply-To: <>

On Mon, Aug 10, 2020 at 03:46:46PM -0400, Joe Lawrence wrote:
> > > > > I'm thinking a newcomer reading this might be lost.  It's not
> > > > > necessarily clear that there are currently two completely different
> > > > > approaches to creating a livepatch module, each with their own quirks
> > > > > and benefits/drawbacks.  There is one mention of a "source-based
> > > > > livepatch author" but no explanation of what that means.
> > > > > 
> > > > 
> > > > Yes, the initial draft was light on source-based patching since I only
> > > > really tinker with it for samples/kselftests.  The doc was the result of an
> > > > experienced livepatch developer and Sunday afternoon w/the compiler. I'm
> > > > sure it reads as such. :)
> > > 
> > > Are experienced livepatch developers the intended audience?  If so I
> > > question what value this document has in its current form.  Presumably
> > > experienced livepatch developers would already know this stuff.
> > 
> > IMHO, this document is useful even for newbies. They might at
> > least get a clue about these catches. It is better than nothing.
> > 
> > I do not want to discourage Joe from creating even better
> > documentation. But if he does not have interest or time
> > to work on it, I am happy even for this piece.

Agreed.  Joe, sorry for instigating and then disappearing :-)

I know we're all busy and I didn't intend to block the patch until we
reach Documentation Nirvana.  Though it would be _really_ nice to get
more input from those who have more experience with the subject matter
(source-based patch generation).

It's part of my job as a maintainer to push back, question, and
sometimes even complain.  I was just wondering where this is heading,
because as our documentation grows (a good thing), the overall state is
getting less cohesive (a bad thing).

Anyway, ACK to the original patch.

> 1. Provide a better index page to connect the other files/docs, like
> but obviously not
> that extensive.  Right now we have only a Table of Contents tree without any
> commentary.
> 2. Rearrange and refactor sections:
> livepatch.rst
>   Keep just about everything
>   Add a history section to explain ksplice, kgraft, kpatch for the
>     uninitiated?
>   Add a section on source based vs. binary diff livepatch creation,
>     this may be worth its own top-level section
> Livepatch API
>   Basic API
>   Callbacks
>   Shadow variables
>   Cumulative patches
>   System state
> KLP Relocations
>   Right now this is a bit academic AFAIK kpatch is the only tool
>   currently making use of them.  So maybe this document becomes a
>   more general purpose doc explaining how to reference unexported
>   symbols?  (ie, how does kgraft currently do it, particularly
>   w/kallsyms going unexported?)
>   Eventually this could contain klp-convert howto if it ever gets
>   merged.
> Compiler considerations
>   TBD

This is certainly a logical way to organize things.  But again I would
wonder, who's the audience?

> I suppose this doesn't create a "Livepatching creation for dummies" guide,
> but my feeling is that there are so many potential (hidden) pitfalls that
> such guide would be dangerous.

I disagree that a live patching creation guide would be dangerous.  I
think it would be less dangerous than *not* having one.  There are
several companies now delivering (hopefully reliable) livepatches to
customers, and they're all presumably following processes.  We just need
to agree on best practices and document the resulting process.  Over
time I believe that will create much more good than harm.

Sure, there are pitfalls, but the known ones can be highlighted in the
guide.  No document is perfect but it hopefully improves and becomes
more useful over time.


  reply	other threads:[~2020-09-01 17:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 16:14 [PATCH 0/2] livepatch: Add compiler optimization disclaimer/docs Joe Lawrence
2020-07-21 16:14 ` [PATCH 1/2] docs/livepatch: Add new compiler considerations doc Joe Lawrence
2020-07-21 23:04   ` Josh Poimboeuf
2020-07-22 17:03     ` Joe Lawrence
2020-07-22 20:51       ` Josh Poimboeuf
2020-08-06 12:03         ` Petr Mladek
2020-08-10 19:46           ` refactoring livepatch documentation was " Joe Lawrence
2020-09-01 17:12             ` Josh Poimboeuf [this message]
2020-09-02 14:00             ` Miroslav Benes
2020-09-02 13:45   ` Miroslav Benes
2020-07-21 16:14 ` [PATCH 2/2] samples/livepatch: Add README.rst disclaimer Joe Lawrence
2020-08-06 12:07   ` Petr Mladek
2020-09-02 13:46   ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200901171220.pgepj3hxrfwy37rj@treble \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).