The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Jessica Yu <jeyu@kernel.org>, Jiri Kosina <jikos@kernel.org>,
	Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>,
	Chris J Arges <chris.j.arges@canonical.com>
Subject: [PATCH v4 0/3] livepatch callbacks
Date: Fri, 25 Aug 2017 15:09:59 -0400	[thread overview]
Message-ID: <1503688202-12121-1-git-send-email-joe.lawrence@redhat.com> (raw)

v4:

- Move callback helpers into core.h

- Move klp_pre_patch_callback() and klp_pre_unpatch_callback()
  invocations into __klp_enable_patch() and __klp_disable_patch()

  - klp_patch_object() and klp_unpatch_objects()
    - Do not run pre-unpatch callbacks from here

- Add a pre_patch_status member to klp_object so when a pre-patch
  callback fails, the helpers can skip any post-patch, pre-unpatch,
  post-unpatch callbacks

- klp_module_coming() and klp_module_going()
  - Do not run post-patch or pre-unpatch callbacks for current
    klp_transition_patch

- Documentation
  - Add various test cases and provide commentary

- Samples
  - Create two target modules: a simple one and another that invokes a
    worker function that sleeps for a long time

- Added two follow-up patches:

  - livepatch: move transition "complete" notice into
    klp_complete_transition() - this pushes the "patching complete" message
    after the post-patch callbacks

  - livepatch: add transition notices - these were helpful during
    debugging of the callback patch.  The transaction annotations were
    also used in the Documentation file tese cases to illustrate the
    order of operations.

  Note that these two patches could be standalone, I include them here
  in this patchset since they affect the content/ordering of kernel logs
  that were included as part of the Documentation.

Joe Lawrence (3):
  livepatch: add (un)patch callbacks
  livepatch: move transition "complete" notice into
    klp_complete_transition()
  livepatch: add transition notices

 Documentation/livepatch/callbacks.txt           | 595 ++++++++++++++++++++++++
 include/linux/livepatch.h                       |  18 +
 kernel/livepatch/core.c                         |  56 ++-
 kernel/livepatch/core.h                         |  78 ++++
 kernel/livepatch/patch.c                        |   1 +
 kernel/livepatch/transition.c                   |  45 +-
 samples/livepatch/Makefile                      |   3 +
 samples/livepatch/livepatch-callbacks-busymod.c |  72 +++
 samples/livepatch/livepatch-callbacks-demo.c    | 234 ++++++++++
 samples/livepatch/livepatch-callbacks-mod.c     |  55 +++
 10 files changed, 1140 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/livepatch/callbacks.txt
 create mode 100644 samples/livepatch/livepatch-callbacks-busymod.c
 create mode 100644 samples/livepatch/livepatch-callbacks-demo.c
 create mode 100644 samples/livepatch/livepatch-callbacks-mod.c

-- 
1.8.3.1

             reply	other threads:[~2017-08-25 19:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 19:09 Joe Lawrence [this message]
2017-08-25 19:10 ` [PATCH v4 1/3] livepatch: add (un)patch callbacks Joe Lawrence
2017-08-29 15:49   ` Josh Poimboeuf
2017-08-29 19:22     ` Joe Lawrence
2017-08-29 19:59       ` Josh Poimboeuf
2017-08-30 13:27         ` Joe Lawrence
2017-08-30 14:20           ` Josh Poimboeuf
2017-08-30 14:48   ` Josh Poimboeuf
2017-08-25 19:10 ` [PATCH v4 2/3] livepatch: move transition "complete" notice into klp_complete_transition() Joe Lawrence
2017-08-29 15:53   ` Josh Poimboeuf
2017-08-25 19:10 ` [PATCH v4 3/3] livepatch: add transition notices Joe Lawrence
2017-08-29 15:55   ` 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=1503688202-12121-1-git-send-email-joe.lawrence@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